Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bullets & Numbering No Longer Work | Microsoft Word Help | |||
The spacebar will no longer work in Word, but works in other prog | Microsoft Word Help | |||
Subscript button and command no longer work | Microsoft Word Help | |||
Subscript button and command no longer work | Microsoft Word Help | |||
Subscript button and command no longer work | Microsoft Word Help |