Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2007

Tip: Looking for answers? Try searching our database.

Saving text within a certain heading level ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alex - 23 Feb 2007 10:01 GMT
Hello everybody,

I'm looking for a macro that would save all the text within a certain
heading style to a separate word file.
If the cursor is positioned within a certain heading then I would like
the macro to save all text within this heading and all subheadings.

Does such a macro already exist ?
And if not, any idea how I can select in VBA all text below a
specified heading ?

Many thanks,

        Axel
Helmut Weber - 23 Feb 2007 12:48 GMT
Hi Alex,

I think, once that what you want is selected,
saving it and copying to wherever you want,
would not be a problem.

Try: Selection.Bookmarks("\headinglevel").Select

See also help for predefined bookmarks.

You might also check whether you are in a heading paragraph:
MsgBox Selection.Style

Unfortunately, there are issues on localization with that.

HTH
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.