View Single Post
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Mail merge and polling buttons

I have never done it, but you can't really control Outlook during a Word
mailmerge. However, you can either
a. use a Word macro to simulate a Word mailmerge and generate Outlook mail
messages or
b.
- flush your Outbox, then set up Outlook to stop sending e-mails
- perform the merge so that your e-mails end up in the Outbox
- use an Outlook macro to process each e-mail in the Outbox so that it
has a voting option
- set up Outlook so it starts sending e-mails again.

I leave you to work out how to do steps 1,2, and 4 of option (b) and how to
set up Outlook so that it can execute Outlook VBA code, but some very crude
Outlook VBA code is as follows:

Sub setvote()
Dim NS As Outlook.NameSpace
Dim oFolder As Outlook.MAPIFolder

Dim oMessage As MailItem
Set NS = Outlook.GetNamespace("MAPI")
For Each oMessage In NS.GetDefaultFolder(olFolderOutbox).Items
oMessage.VotingOptions = "red;amber;green"
oMessage.Save
oMessage.Send
Next
Set NS = Nothing
End Sub

For option (a), I suggest you look at the following article by Doug Robbins
(which may be overkill for your purposes, or may be just the ticket), and
work out how to modify the messages it generates using the above sample
code:

http://word.mvps.org/FAQs/MailMerge/...ttachments.htm

Peter Jamieson

"Richard" wrote in message
...
I know this may be impossible; howeve, I would like to use the polling
option
for a mailmerge email I am writing. Has anyone done this already?
If so how?
Thank you.