Updating word bookmarks 
Author Message
 Updating word bookmarks

Hi, I have a document that utilises bookmarks.
I use the bookmarks to insert text at certain places within the document.

My problem is that I want to update the bookmark text via code..

e.g
oWordDoc.Bookmarks.Item("PersonName").Range.InsertBefore("Personsname")

When I do this the text is appended to the text that already exists for the
bookmark.
What I would like to do is clear the existing text and insert some new text
in its place.

I tried calling the delete method but this deletes the bookmark as well.

Any help appreciated
Mark

--
==============================
e-evolution.net
Internet and Application development
http://www.*-*-*.com/
http://www.*-*-*.com/
http://www.*-*-*.com/

New Zealand search engine
http://www.*-*-*.com/
==============================



Fri, 29 Apr 2005 18:51:19 GMT  
 Updating word bookmarks
Answered in microsoft.public.word.vba.general


Quote:
> Hi, I have a document that utilises bookmarks.
> I use the bookmarks to insert text at certain places within the document.

> My problem is that I want to update the bookmark text via code..

> e.g
> oWordDoc.Bookmarks.Item("PersonName").Range.InsertBefore("Personsname")

> When I do this the text is appended to the text that already exists for
the
> bookmark.
> What I would like to do is clear the existing text and insert some new
text
> in its place.

> I tried calling the delete method but this deletes the bookmark as well.

> Any help appreciated
> Mark

> --
> ==============================
> e-evolution.net
> Internet and Application development
> http://www.e-evolution.net
> http://www.kiwis-online.com
> http://www.maimarae.co.nz

> New Zealand search engine
> http://search.kiwis-online.com
> ==============================



Fri, 29 Apr 2005 22:16:48 GMT  
 Updating word bookmarks
Great, thankyou

--
==============================
e-evolution.net
Internet and Application development
http://www.e-evolution.net
http://www.kiwis-online.com
http://www.maimarae.co.nz

New Zealand search engine
http://search.kiwis-online.com
==============================

Quote:
> Hi, I have a document that utilises bookmarks.
> I use the bookmarks to insert text at certain places within the document.

> My problem is that I want to update the bookmark text via code..

> e.g
> oWordDoc.Bookmarks.Item("PersonName").Range.InsertBefore("Personsname")

> When I do this the text is appended to the text that already exists for
the
> bookmark.
> What I would like to do is clear the existing text and insert some new
text
> in its place.

> I tried calling the delete method but this deletes the bookmark as well.

> Any help appreciated
> Mark

> --
> ==============================
> e-evolution.net
> Internet and Application development
> http://www.e-evolution.net
> http://www.kiwis-online.com
> http://www.maimarae.co.nz

> New Zealand search engine
> http://search.kiwis-online.com
> ==============================



Sat, 30 Apr 2005 06:06:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Word Bookmarks, Userforms and Updates

2. Office XP only: Spurious bookmark added to Word document Automating Powerpoint from Word

3. Updating Links in Word 2002, Edit, Links, Select Update Method

4. Updating recordset with bookmark?

5. Updating Bookmark names

6. Updating Bookmarks in header

7. Updating Bookmarks in Headers

8. Updating a bookmark via code

9. Updating Bookmarks without Deleting

10. Update bookmarks in header

11. DBGrid: bookmark of inserted/updated row

12. Update control w/o changing bookmark?

 

 
Powered by phpBB® Forum Software