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.

Creating bookmarks automatically via visual basic and word 2000

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
larryfergy - 24 Nov 2004 17:11 GMT
I have a documents directory that consists of word documents and a table of
contents that relate to those documents. So I thought I would create
bookmarks as they relate in the table of contents. Then create adobe acrobat
pdf from that.

I inntially was using macros but found I would have edit forever, so I
thought why not use visual basic.
I thought I could search for table of contents item and then add a bookmark,
but the search apparently doesn't return an address :

Set myRange = ActiveDocument.Content
myRange.Find.Execute FindText:="Visual Basic 6.0 versus Other Versions of
Visual Basic", Forward:=True

I can create bookmarks via visual basic via :

Set myDoc = Documents("Class 1 with bookmarks.doc")
myDoc.Bookmarks.Add Name:="V_B6_versus_Other_Versions_of_VB", _
   Range:=myDoc.Paragraphs(3).Range
myDoc.ActiveWindow.View.ShowBookmarks = True

But thats a bookmark to nothing.

How do you access the document and scroll thruugh it via visual basic?
Word Heretic - 25 Nov 2004 11:59 GMT
G'day "larryfergy" <larryfergy@discussions.microsoft.com>,

MyDoc.TablesOfContents(1).Range

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice

larryfergy reckoned:

>I have a documents directory that consists of word documents and a table of
>contents that relate to those documents. So I thought I would create
[quoted text clipped - 20 lines]
>
>How do you access the document and scroll thruugh it via visual basic?
 
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.