Setting Cursor Position

R

Ray Worrell

Hi!

I'm totally new to programming Word and Outlook with VBA, and I have a
question.

I'm working on a macro that will take a contact and create a FAX document
for it with the information from the contact item. This is just a contrived
thing I'm working on to get a feel for how everything works.

I got it working, but I was wondering if there would be a way to position
the resulting Word document to a specific cursor position. For example, I
would like the cursor position to default to the FAX subject of the newly
created Word document. Is that possible? If so, could you please include a
code snippet on how to do it? Remember I'm new!

Thanks for all of your help.

Ray.
 
H

Helmut Weber

Hi Ray,
impossible, in one way, and easy in another way.
You can position the cursor anywhere you like,
if you can identify the location somehow. If the subject paragraph
starts with "Subject: " and if this occurs only once in a doc,
then you got a definition of the location.
Search for "Subject: "
Or if the subject paragraph would be the first paragraph starting
with "Subject: ", or the paragraph number x ...
Using selection and search, the cursor will be at the postition
of what you've been searching for, if it was found. The question is,
what to search for...
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

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