M
Mike Kiser
Hello! HELP!
I have spend hours on this and also researching similar probs. I have
my Mail Merge working perfectly and am trying to email out the
completed merged Doc in HTML format (in email body). My code is as
follows. The Error I get is:
"Record 1 could not be mailed because it contained a bad mail address"
THANKS!!! Mike
CODE:
// Perform mail merge.
// wrdMailMerge.Destination =
Word.WdMailMergeDestination.wdSendToNewDocument;
wrdMailMerge.Destination =
Word.WdMailMergeDestination.wdSendToEmail;
wrdApp.ActiveDocument.MailMerge.MailAsAttachment = false;
wrdApp.ActiveDocument.MailMerge.MailAddressFieldName =
"(e-mail address removed)";
wrdApp.ActiveDocument.MailMerge.MailSubject = "test";
wrdMailMerge.MailFormat =
Word.WdMailMergeMailFormat.wdMailFormatHTML;
wrdApp.ActiveDocument.MailMerge.SuppressBlankLines =
false;
wrdMailMerge.Execute(ref oFalse);
// Close the original form document.
wrdDoc.Saved = true;
wrdDoc.Close(ref oFalse, ref oMissing, ref oMissing);
I have spend hours on this and also researching similar probs. I have
my Mail Merge working perfectly and am trying to email out the
completed merged Doc in HTML format (in email body). My code is as
follows. The Error I get is:
"Record 1 could not be mailed because it contained a bad mail address"
THANKS!!! Mike
CODE:
// Perform mail merge.
// wrdMailMerge.Destination =
Word.WdMailMergeDestination.wdSendToNewDocument;
wrdMailMerge.Destination =
Word.WdMailMergeDestination.wdSendToEmail;
wrdApp.ActiveDocument.MailMerge.MailAsAttachment = false;
wrdApp.ActiveDocument.MailMerge.MailAddressFieldName =
"(e-mail address removed)";
wrdApp.ActiveDocument.MailMerge.MailSubject = "test";
wrdMailMerge.MailFormat =
Word.WdMailMergeMailFormat.wdMailFormatHTML;
wrdApp.ActiveDocument.MailMerge.SuppressBlankLines =
false;
wrdMailMerge.Execute(ref oFalse);
// Close the original form document.
wrdDoc.Saved = true;
wrdDoc.Close(ref oFalse, ref oMissing, ref oMissing);