#1
|
||||
|
||||
Macro to Expand Outline Heading in Outline View?
About fifteen or so years ago I played around with Word 97 macros, and I'd like to start working with them again.
Right now I'm running Word 2003 under Windows XP Home. This morning I tried to record a macro that opens a set of 5 .doc files in Outline View, sets their "Show Level" to 1, and then by clicking on the plus sign of the first heading of each file, expanding just the contents of the first headings and leaving all the headings below it unexpanded. But when I ran the macro, it failed to reproduce that last step, i.e. expanding the first heading in each of the outlines. (The macro did however "remember" to set the display level of all the outlines to "1.") Any ideas on how I can record that step in the macro, or edit the macro to include it? After all these years I'm really rusty, and am going to have to work on relearning how to work with macros all over again. Will in Seattle a.k.a. "Clueless" |
#2
|
||||
|
||||
Solved!
I just figured out how to solve this problem, so thought I should probably post my solution here in case someone comes across this thread in the future:
The reason my first recorded macro didn't work was that there are two ways to expand a heading:
When I first tried recording my macro I used the first method. Apparently the Word 2003 macro recorder doesn't record the first method. But I learned that it does recognize the second method. I found this out by re-recording my macro using the second method. Then when I played the macro back, it opened the .doc file and expanded just the first heading of the outline, just as I had hoped it would. I looked at the macro code and here's the command: ActiveWindow.ActivePane.View.ExpandOutline Range:=Selection.Range So now, how do I mark this thread as "Solved!"? Will in Seattle a.k.a. "Clueless" |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change the right margin setting in MS Word Outline view | gopher_everett | Word | 5 | 03-21-2023 10:45 AM |
trouble with formating between print view and outline view | johndill | Word | 2 | 10-17-2014 06:32 AM |
MS Word 2013 Outline View | mswmacroman | Word | 3 | 04-26-2014 02:35 PM |
Word 2007: Hide Styles Pane in Outline View | rphox2003 | Word | 0 | 04-07-2012 11:37 PM |
How do I get a summary sentence for each paragraph shown in outline view | the_aj | Word | 1 | 08-05-2011 12:27 PM |