Group: microsoft.public.word.vba.general
From: "Doug Robbins - Word MVP"
Date: Saturday, February 23, 2008 5:01 PM
Subject: Re: Code in document to place bookmarked data in Outlook subject line

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


Safety Articles | Usenet Groups | Usenet News | Bluegrass