In earlier versions of Outlook than 2010 you could get round it using VBA in
the Outlook application and calling that from excel. This does not work in
2010.
There is an application which replaces the outlook object model (cost $49.00
per developer) here http://www.everythingaccess.com/vbMAPI.htm#moreinfo
Or there are programs you can run on the pc which sit and wait for the
dialog to appear and then push the button. PTFB is one. The freeware
version is still available on some sites but the current version is PTFBpro
which is $39 (I think). This has to be installed and configured on the PC
where the program is running.
Best Regards
David Grugeon
Excel VBA Group Moderator
-----Original Message-----
From: ExcelVBA@yahoogroups.com [mailto:ExcelVBA@yahoogroups.com] On Behalf
Of sspatriots
Sent: Tuesday, 27 September 2011 9:01 PM
To: ExcelVBA@yahoogroups.com
Subject: [ExcelVBA] Microsoft Outlook Pop-up Warning Message
Hi,
I have the portion of code that will always give me that warning from
Outlook that "A program is trying to send an e-mail on my behalf...". Can
someone tell me how to modify it to stop the warning message? I tried
putting the following line in front of and behind ".SendMail...", but I
think it was in the wrong place both times, because it didn't work.
.Application.DisplayAlerts = False
Thanks,
Steve
With Destwb
.SaveAs TempFilePath & TempFileName & FileExtStr,
FileFormat:=FileFormatNum
On Error Resume Next
For I = 1 To 3
.SendMail "someone@somewhere.com", _
"ABC Daily Report; Be sure to Enable Editing when you launch the
attachment"
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0
.Close SaveChanges:=False
End With
------------------------------------
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go
here: http://www.mousetrax.com/techtrax to enter the ezine, then search the
ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------Yahoo! Groups Links
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Tidak ada komentar:
Posting Komentar