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

Tip: Looking for answers? Try searching our database.

adding bookmarks stop without message why

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
larryfergy - 04 Dec 2004 14:55 GMT
I have a document 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.

Well I had to modify the bookmarks with _ and some search fields. So I
massage them with c language. The following code works with the files I
created with C language.

The problem is that I can only create 9 bookmarks and the program finishes
prematurely without giving me a message why.
When I check out in word 2000 with inserting bookmarks I find the 9
bookmarks there but the dropdown box v isn't available. It can't add more
bookmarks .I also tried this code also :

"ActiveDocument.Bookmarks.ShowHidden = True
      For Each aBookmark In ActiveDocument.Bookmarks
          If Left(aBookmark.Name, 1) = "_" Then MsgBox aBookmark.Name
           Next aBookmark
It ends up with the same unfilled record count. I know that there is at
least 12 more _ items to add with the above code by dies with just 9 records.
There is nothing wrong with files I've create
Heres my code below

Do While Not EOF(1)

   Line Input #1, searchstring
   
   Line Input #2, bookmarkfield
   
   
 
   
       Set MyRange = ActiveDocument.Content
       MyRange.Find.Execute findText:=searchstring, Forward:=True
       If MyRange.Find.Found = False Then Exit Do
       
      ActiveDocument.Bookmarks.ShowHidden = True
     
       ActiveDocument.Bookmarks.Add Name:=bookmarkfield, Range:=MyRange
       
      ActiveDocument.Bookmarks.ShowHidden = True

       Rem MyRange.Bookmarks(counter).Add Name:=bookmarkfield
       
       ActiveWindow.View.ShowBookmarks = True
       primenumber = 0
       
 
       
       
  counter = counter + 1
     
       
   
Loop
offset = offset + 1

Close #1
Close #2
larryfergy - 04 Dec 2004 17:31 GMT
I posted this in hast apparently. It was ending on search. Sorry. I still
think it will stop after nine but I'LL post later if so.

> I have a document 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 - 56 lines]
> Close #1
> Close #2

Rate this thread:






 
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.