Avoid outlook security warning message.

  • Thread starter Thread starter ashish taralekar
  • Start date Start date
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.
 
Back
Top