helgeroe
New Member
- Joined
- Dec 16, 2008
- Messages
- 37
Hi
I'm tying to send a Excel generated mail with attachment from Outlook, but get this security message:
A program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No".
Excerpts from the code I'm using:
Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True
Set oMailItem = oOutlook.CreateItem(0)
With oMailItem
.To = Email
.Subject = emne
.body = tekst
.Attachments.Add ActiveWorkbook.FullName
.Importance = olImportanceHigh
' .Display
.send
End With
How do I avoid this pop-up?
Would also be practical to mark the e-mail with High Importance (tried in the code, but did not work) and to flag the mail to be followed up within a date.
Using Office 2003.
Thanks.
Helge
I'm tying to send a Excel generated mail with attachment from Outlook, but get this security message:
A program is trying to automatically send e-mail on your behalf.
Do you want to allow this?
If this is unexpected, it may be a virus and you should choose "No".
Excerpts from the code I'm using:
Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True
Set oMailItem = oOutlook.CreateItem(0)
With oMailItem
.To = Email
.Subject = emne
.body = tekst
.Attachments.Add ActiveWorkbook.FullName
.Importance = olImportanceHigh
' .Display
.send
End With
How do I avoid this pop-up?
Would also be practical to mark the e-mail with High Importance (tried in the code, but did not work) and to flag the mail to be followed up within a date.
Using Office 2003.
Thanks.
Helge