Word 2003 mail merge to Groupwise - sending a few to wrond recipie

S

SylvieQ

I have a Word 2003 e-mail message type document. My data source for the merge
is a .csv file, from which I piked a few mergefields and from which is picked
the EmailID when I merge to e-mail (Groupwise). The mail format is Plain
text. All seems to work fine ... except ... a few emails are sent to the
wrong e-mail address found in the .csv file. So one recipient gets his e-mail
and someone else's e-mail. And that someone doen't get an e-mail since his
address was swapped at some point. Does somebody know of a problem like this
one?

My template message is created in MS Office Word 2003 (11.6502.6408) SP1.
We are running Novell GroupWise 7.0 (7.0.1 14/12/2006, 553).
I can re-produce this behaviour with a smaller 45 row .csv file.

Currently, we are using the following solution, using Word 2003:
- opening up template document
- setting main document type to 'E-mail messages'
- opening data source, .csv file
- when having a look at 'Mail Merge Recipients', all EmailIDs in the file
look great
- then 'Merge to E-mail', To: EmailID, Mail format: Plain text (and not
HTML), all looks fine for all records HOWEVER, some emails are sent to the
wrong recipient email (2%). (HTML Mail format won't send a thing.)

My test csv file has only 45 rows of data, with 1000 fields accross.

Thank you
--
Sylvie Quesnel
Analyste de systèmes / IT Systems Analyst
La Cité collégiale
801, prom. de l''''Aviation
Ottawa (Ontario) K1K 4R3
(e-mail address removed)
(613)742-2493 poste 2869 Fax: (613)742-2488
 
P

Peter Jamieson

I haven't seen a problem like this, no, but I don't have Groupwise and so
can not test with that product.

Do all the rows in the .csv file have a valid e-mail address in the column
you select as the "email address field"? Are any of them blank, for example?
If you merge to a new document instead of email and include the e-mail field
in your mail merge main document, is the correct address output to the new
document (i.e., does it /only/ fail when you are merging to e-mail) ?
 
S

SylvieQ

Yes, all the rows in my test .csv file have a valid e-mail address in the
column I select as the "email address field" (EmailID). None of them are
blank. If I merge to a new document instead of email and include the e-mail
field in my mail merge main document, all correct addresses output to the new
document, no mix up whatsoever. Yes, it only swaps a few addresses when I
merge to e-mail.
--
Sylvie Quesnel
Analyste de systèmes / IT Systems Analyst
La Cité collégiale
801, prom. de l''''Aviation
Ottawa (Ontario) K1K 4R3
(e-mail address removed)
(613)742-2493 poste 2869 Fax: (613)742-2488
 
P

Peter Jamieson

Does it always fail with the same e-mail addresses, or does it appear to be
random? e.g., if you make two data files:
a. one with the records that go wrong
b. one with the records that go right

when you merge to (a), do they all still go wrong? And when you merge to
(b), do they all go right?

If that is the case, then I would have to guess that something is probably
trying to "verify" the addresses in some way (e.g. Outlook does this if I
enter my address as "Peter Jamieson" rather than pjj@whatever.

But since I do not know what is going wrong, I can only suggest that you try
the following workaround, which performs one mail merge for each record in
the data source. (Of course, if the problem is something to do with the way
that each e-mail address is processed, this will probably still fail).

e.g.
Sub ProduceOneEmailPerSourceRec()
'
' NB, needs bettor error management and doubtless other things a VBA expert
' will point out.

Dim intSourceRecord
Dim objMerge As Word.MailMerge
Dim bTerminateMerge As Boolean

' Need to set up this object as the ActiveDocument changes when the
' merge is performed. Besides, it's clearer.

Set objMerge = ActiveDocument.MailMerge
With objMerge

' If no data source has been defined, do it here using OpenDataSource.
' But if it is already defined in the document, you should not need to
define it here.

' .OpenDataSource _
' Name:="whatever"

' I don't use FirstRecord, LastRecord because they do not behave
' the way you expect in all data sources.

intSourceRecord = 1
bTerminateMerge = False

Do Until bTerminateMerge
.DataSource.ActiveRecord = intSourceRecord

' if we have gone past the end (and possibly, if there are no records)
' then the Activerecord will not be what we have just tried to set it to

If .DataSource.ActiveRecord <> intSourceRecord Then
bTerminateMerge = True
' the record exists
Else
.DataSource.FirstRecord = intSourceRecord
.DataSource.LastRecord = intSourceRecord
.Destination = = wdSendToEmail
' set up the field containing the e-mail address - use your own field
name
.MailAddressFieldName = "eaddress"
' Set up the subject - make sure any field name in here has the same
' capitalisaiton as the name in the data source
.MailSubject = .DataSource.DataFields("FirstName").Value & _
"- here's your data for 2007"
.Execute
intSourceRecord = intSourceRecord + 1
End If
Loop
End With
 
S

Sylvie

It swaps e-mail addresses randomly. I just did 3 tests and I got different
swaps each time. So I wouldn't even know how to split the file...
I'm not sure I follow you with the workaround you suggested. I'm not sure
if or how you want me to use the ProduceOneEmailPerSourceRec() procedure.
Can you help me out on this one? Thank you
 
P

Peter Jamieson

I'm not sure I follow you with the workaround you suggested. I'm not sure
if or how you want me to use the ProduceOneEmailPerSourceRec() procedure.

The idea of the workaround is that you
a. put the VBA code where it can be run (see, e.g.
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm
b. create your mail merge main document and connect it to your data source
in the usual way
c. instead of clicking on any of the usual options to start your merge to
email, run the macro

All the macro does is perform one merge for each record in the data source.
It is possible that by doing that, you will avoid the problem. However,
since we do not know the cause of this problem and the substitution appears
to be random, this approach may not work either.
 

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