Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Nimbus Nimbus is offline
external usenet poster
 
Posts: 17
Default Word 2002 macros no longer work

I am trying to change the heading styles used in a document to different
heading styles, ie Myheading2 to Myheading3. I wish to do this on a number
of documents so as a trial I created a macro which converted just one of the
headings on one of the documents using find and replace.
I can't get the macro to work. When I run it nothing appears to happen.
However when I go back to using find and replace manually I find all the
formatting of the styles is attached to the find and replace boxes. ie
Myheading2 is set to 16 point bold and the find box also shows that it is
looking for 16 point bold. Myheading3 is set to 14 point underline and so is
the replace box. The macro is apparently doing something.
I have set up and used this kind of macro many times when I used Word on an
XP setup. I now use Vista. Do I need to do something different on Vista?

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Word 2002 macros no longer work

The macro recorder has a bug that prevents it from recording any style or
formatting information in Find and Replace operations. See the section
"Fixing broken Replace macros" in
http://www.word.mvps.org/FAQs/Macros...ordedMacro.htm for
instructions on how to fix the macro. In your case, instead of adding .Font
and .Replacement.Font statements, you will need the statements

.Style = ActiveDocument.Styles("Myheading2")
.Replacement.Style = ActiveDocument.Styles("Myheading3")

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Nimbus wrote:
I am trying to change the heading styles used in a document to
different heading styles, ie Myheading2 to Myheading3. I wish to do
this on a number of documents so as a trial I created a macro which
converted just one of the headings on one of the documents using find
and replace.
I can't get the macro to work. When I run it nothing appears to
happen. However when I go back to using find and replace manually I
find all the formatting of the styles is attached to the find and
replace boxes. ie Myheading2 is set to 16 point bold and the find box
also shows that it is looking for 16 point bold. Myheading3 is set to
14 point underline and so is the replace box. The macro is
apparently doing something.
I have set up and used this kind of macro many times when I used Word
on an XP setup. I now use Vista. Do I need to do something
different on Vista?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Word 2002 macros no longer work

See the "Fixing broken Replace macros" section of
http://word.mvps.org/faqs/macrosvba/...ordedMacro.htm.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Nimbus" wrote in message
...
I am trying to change the heading styles used in a document to different
heading styles, ie Myheading2 to Myheading3. I wish to do this on a

number
of documents so as a trial I created a macro which converted just one of

the
headings on one of the documents using find and replace.
I can't get the macro to work. When I run it nothing appears to happen.
However when I go back to using find and replace manually I find all the
formatting of the styles is attached to the find and replace boxes. ie
Myheading2 is set to 16 point bold and the find box also shows that it is
looking for 16 point bold. Myheading3 is set to 14 point underline and so

is
the replace box. The macro is apparently doing something.
I have set up and used this kind of macro many times when I used Word on

an
XP setup. I now use Vista. Do I need to do something different on Vista?


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Nimbus Nimbus is offline
external usenet poster
 
Posts: 17
Default Word 2002 macros no longer work

Thank you both for the prompt replies.
I thought I had used that sort of macro before - It seems I hadn't. I have
looked at the reference you gave and it gives a very clear description of
what to do. Thanks again.



"Suzanne S. Barnhill" wrote:

See the "Fixing broken Replace macros" section of
http://word.mvps.org/faqs/macrosvba/...ordedMacro.htm.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Nimbus" wrote in message
...
I am trying to change the heading styles used in a document to different
heading styles, ie Myheading2 to Myheading3. I wish to do this on a

number
of documents so as a trial I created a macro which converted just one of

the
headings on one of the documents using find and replace.
I can't get the macro to work. When I run it nothing appears to happen.
However when I go back to using find and replace manually I find all the
formatting of the styles is attached to the find and replace boxes. ie
Myheading2 is set to 16 point bold and the find box also shows that it is
looking for 16 point bold. Myheading3 is set to 14 point underline and so

is
the replace box. The macro is apparently doing something.
I have set up and used this kind of macro many times when I used Word on

an
XP setup. I now use Vista. Do I need to do something different on Vista?



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bullets & Numbering No Longer Work kaqgVT Microsoft Word Help 1 January 11th 07 12:08 PM
The spacebar will no longer work in Word, but works in other prog misty Microsoft Word Help 1 April 2nd 06 09:46 AM
Subscript button and command no longer work demigod Microsoft Word Help 2 February 20th 05 03:32 AM
Subscript button and command no longer work demigod Microsoft Word Help 0 February 17th 05 06:31 AM
Subscript button and command no longer work demigod Microsoft Word Help 0 February 17th 05 06:31 AM


All times are GMT +1. The time now is 02:17 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"