Avoid outlook security warning message.

A

ashish taralekar

Hi,
I am using word mail merge function through vb.net. The code is as
shown below.

With wordapp.ActiveDocument.MailMerge
.Destination =
Word.WdMailMergeDestination.wdSendToEmail
.SuppressBlankLines = True
With .DataSource
.FirstRecord =
Word.WdMailMergeDefaultRecord.wdDefaultFirstRecord
.LastRecord =
Word.WdMailMergeDefaultRecord.wdDefaultLastRecord
End With
wrdMailMerge.MailSubject = "Mail Merged Document."
wrdMailMerge.MailAddressFieldName = "Email_Address"
.Execute(Pause:=False)
End With

but, when i execute this function the outlook gives me security
warning message "A program is trying to access email addresses you
have stored in outlook. Do you want to allow this?"

Please give me the solution for avoiding this message.


Thanks,
Ashish Taralekar.
 

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