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 / November 2004

Tip: Looking for answers? Try searching our database.

Indexing Word VBA or Indexer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MrQuestions - 13 Nov 2004 17:21 GMT
I'm looking for a quick way to index all words in a microsoft word document.
The indexer in word seems to be all manual.  I tried a program to itterate
the word object model but it gives me only word and word number not page
number or paragraph number -- in fact I couldn't find page in the word
object model.  Any ideas or code sample appreciated.
Jezebel - 14 Nov 2004 10:59 GMT
Page isn't itself in the object model, but you can get the page number of
any range -- including a word -- from the Range.Information property. So if
you wanted to build your own index you could use

Dim pWord as Word.Range
For each pWord in ActiveDocument.Words
   ... output pWord, pWord.Information(wdActiveEndPageNumber)
Next

> I'm looking for a quick way to index all words in a microsoft word document.
> The indexer in word seems to be all manual.  I tried a program to itterate
> the word object model but it gives me only word and word number not page
> number or paragraph number -- in fact I couldn't find page in the word
> object model.  Any ideas or code sample appreciated.
 
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.