Hi I am trying to send email using the Outlook 2003 in my VB6 program. I am getting popup message from the outlook and need to click Yes to allow to send the mail.
I want to automate this process instead of clicking Yes to those messages. Please share your knowledge with me how to answer window messages like this in the VB6 program. Or to change any settings in my Outlook to allow send mails.
I have attached those messages in a work document. Please take a look.
Usually, in MS Office document, there is a property "DisplayAlerts" you can set to false to bypass those little messages, but I don't know if it can work in this case.
Usually, in MS Office document, there is a property "DisplayAlerts" you can set to false to bypass those little messages, but I don't know if it can work in this case.
i think there was another thread here about the same problem.
and the person said changing the "display alerts" option did
not stop the messages from popping up.
Thanks George1111, Can you explain me how to send through SMTP? Also let me know if I can answer a reply 'Yes' within my program for popup messages. then I can continue my old program to work.
Appreciate the support of you guys and this is a great place to find solution and share the knowledge.
hi friends
try this code ...u will not receive any warning messages
The code below requires no declaration just add microsoft outlook object
try this u will......enjoy
Dim strPath$, OutlookItem, ColAttach
Const olByValue = 1
Set OutlookItem = Application.CreateItem(0)
OutlookItem.To = "youremail@email.com"
OutlookItem.Subject = "This will work!"
OutlookItem.Body = "This works great, no warning message from Outlook!"
Set ColAttach = OutlookItem.Attachments
strPath = App.Path & "\simple.txt"
ColAttach.Add strPath, olByValue, 1, "File Attachment"
OutlookItem.Display
SendKeys "%{s}", True
Thanks for the nice example - how can I send the email automatically without previewing it first? I've tried commenting out "Outlookitem.display" but then the email doesn't send at all
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.