Move cursor in Word 2003

S

Sander

Hello everybody,

I hope someone can help me in the right direction with vba in word 2003. I
want to write a function to replace a string in a document or template with a
value from a database. For example; replace <<name>> in a document with field
[customer_name] from a database. After doing that, I want to go a specific
point in the document, and that is my problem! How can I move the cursor to a
given location in a doc or dot file? I want to name this location <<loc>> for
example and have the code replace this holder and go there.

Thanks for your help!
 
D

Doug Robbins - Word MVP

Use a bookmark and then have your code select the .Range of the bookmark

ActiveDocument.Bookmarks("movehere").Range.Select

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top