Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-01-2015, 03:41 PM
Clueless in Seattle's Avatar
Clueless in Seattle Clueless in Seattle is offline Macro to Expand Outline Heading in Outline View? Windows XP Macro to Expand Outline Heading in Outline View? Office 2003
Novice
Macro to Expand Outline Heading in Outline View?
 
Join Date: Jan 2012
Posts: 26
Clueless in Seattle is on a distinguished road
Question 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"
Reply With Quote
  #2  
Old 05-04-2015, 05:44 PM
Clueless in Seattle's Avatar
Clueless in Seattle Clueless in Seattle is offline Macro to Expand Outline Heading in Outline View? Windows XP Macro to Expand Outline Heading in Outline View? Office 2003
Novice
Macro to Expand Outline Heading in Outline View?
 
Join Date: Jan 2012
Posts: 26
Clueless in Seattle is on a distinguished road
Lightbulb 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:

  1. You can double click on the plus sign to the left of the heading, or
  2. You can click on the plus sign on the Outline Toolbar.

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"
Reply With Quote
Reply

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
Macro to Expand Outline Heading in Outline View? trouble with formating between print view and outline view johndill Word 2 10-17-2014 06:32 AM
Macro to Expand Outline Heading in Outline View? 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
Macro to Expand Outline Heading in Outline View? How do I get a summary sentence for each paragraph shown in outline view the_aj Word 1 08-05-2011 12:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft