I have a Word document that has bookmark fields. I would like data
from some of the bookmarks to show in the subject line when I email
the document. We are using Office 97. Can this be done with code in
the Word document or is it done in Outlook?

Thanks in advance
Ron

Re: Code in document to place bookmarked data in Outlook subject line by Doug

Doug
Sat Feb 23 15:01:18 PST 2008

It can be done with code in Word once you have a reference in the Visual
Basic Editor to the appropriate Outlook Object Model.

See the article "How to send an email from Word using VBA" at:

http://www.word.mvps.org/FAQs/InterDev/SendMail.htm

in the code in the second method in that article, you would replace the line

.Subject = "New subject"

with

.Subject = "sometext" &
ActiveDocument.Bookmarks("nameofbookmarktobeinsertedinsubject").Range.Text &
"somemoretextifnecessary"



--
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

"A_Classic_Man" <rmerkel2@cox.net> wrote in message
news:f583f8a7-f2fa-45a4-a7c3-0a3eb597eb78@c33g2000hsd.googlegroups.com...
>I have a Word document that has bookmark fields. I would like data
> from some of the bookmarks to show in the subject line when I email
> the document. We are using Office 97. Can this be done with code in
> the Word document or is it done in Outlook?
>
> Thanks in advance
> Ron