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 / January 2007

Tip: Looking for answers? Try searching our database.

Extracting Headers and Body text from MS Word to use in Excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
spences10 - 29 Jan 2007 14:50 GMT
Hi All,

Does anyone know of any code examples of Excel extracting Headers and
Body text from MS Word which can be used and manipulated by excel?

So say if I had header 1,2,3,4 in the MS Word document, and I want to
have the header and body text from header 2 & 4 say to be
concatenated
or displayed in the same text box in an Excel UserForm - I am
assuming
this is possible, but have no idea where to start.

Can anyone help me please?
Doug Robbins - Word MVP - 29 Jan 2007 18:47 GMT
This was posted by fellow MVP Jay Freedman, apparently in response to your
identical post in the microsoft.public.word.vba.beginners newsgroup:

Quote

Before we go too far astray here, let's agree on terminology:

- When you say "header", do you mean what Word calls a "header" -- an area
at the top of each page, whose contents repeat on each page of an entire
section -- or do you mean "heading", a paragraph somewhere in the page that
has a specific style such as "Heading 1"? These things are very different;
in VBA terms, they belong to different objects and require very different
code.

- When you list numbers like "1,2,3,4" -- assuming you really meant
"headings" and not "headers" -- are you referring to their order in the
document or to the outline level of their styles ("Heading 1", "Heading 2",
etc.)? If the former, then are all the headings in the same style?

Finally, this topic belongs in one of the programming newsgroups, so I'm
setting the Followup field to microsoft.public.word.vba.beginners.

Signature

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.

Unquote
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi All,
>
[quoted text clipped - 9 lines]
>
> Can anyone help me please?
 
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.