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 / March 2005

Tip: Looking for answers? Try searching our database.

Word 2000 Insert text into bookmark of Protected document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
K. Wilder - 24 Mar 2005 20:05 GMT
I've written a little VB 6.0 app that creates a Word 2000 application object
to open any selected Word document.

I want to search for a particular Bookmark and then insert text into it.  

I have been able to locate the bookmarks, but since the document is
protected I get an error inserting the text using either .InsertBefore or
.InsertAfter.

Does anyone know how to insert the text into the bookmark and retain the
bookmark?  

I can manually unprotect the document and then the program runs fine, but it
still either inserts the text before the bookmark or after it, or replaces
it.  I want to keep it.

Any help is appreciated.

Thanks,

King
David Sisson - 24 Mar 2005 20:41 GMT
> I have been able to locate the bookmarks, but since the document is
> protected I get an error inserting the text using either .InsertBefore or
> .InsertAfter.

That's normal.  Unprotect first.  Insert text.  Reprotect doc.

> Does anyone know how to insert the text into the bookmark and retain the
> bookmark?

http://word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm
K. Wilder - 24 Mar 2005 23:37 GMT
David,

Unfortunately, I won't have access to the password to unprotect it.  This is
a third party Word document that my client is using.  I trying to create a
automated way of them filling in the forms.

Thanks,

King

> > I have been able to locate the bookmarks, but since the document is
> > protected I get an error inserting the text using either
[quoted text clipped - 8 lines]
>
> http://word.mvps.org/FAQs/MacrosVBA/InsertingTextAtBookmark.htm
 
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.