I have been using code similar to this to create a bulk email for everyone in the table mydatabase:
scan
oApp = createObject("Outlook.Application"
oMail = oApp.CreateItem(0)
oMail.to=alltrim(mydatabase.emailaddress)
oMail.subject = "Subject here"
oMail.body = "Email body test here"
oMail.send()
release oApp
release oMail
endscan
It works great with Outlook 2000 but with Outlook XP it has problems. I get a couple of messages and the user is forced to press the "Yes" button for each message to be sent. Here are the messages:
"A program is trying to send mail using Item.Send
A program is trying to automatically send email using a Microsoft Outlook Visual Basic command, Item.send. If you want this program to send this email, click Yes. To stop the program click No. If you are unsure which program is sending the email or why, you may want to click No to avoid any possible spread of viruses.
Note: when this message is displayed the Yes button is not available for 5 seconds"
Then a box appears where you can press Yes or No. The big problem is that the user has to wait 5 seconds and press Yes for each email.
I think I understand what Microsoft is trying to do here but hope there is a way around it without asking users to go back to Outlook 2000.
Thanks for any help.
scan
oApp = createObject("Outlook.Application"
oMail = oApp.CreateItem(0)
oMail.to=alltrim(mydatabase.emailaddress)
oMail.subject = "Subject here"
oMail.body = "Email body test here"
oMail.send()
release oApp
release oMail
endscan
It works great with Outlook 2000 but with Outlook XP it has problems. I get a couple of messages and the user is forced to press the "Yes" button for each message to be sent. Here are the messages:
"A program is trying to send mail using Item.Send
A program is trying to automatically send email using a Microsoft Outlook Visual Basic command, Item.send. If you want this program to send this email, click Yes. To stop the program click No. If you are unsure which program is sending the email or why, you may want to click No to avoid any possible spread of viruses.
Note: when this message is displayed the Yes button is not available for 5 seconds"
Then a box appears where you can press Yes or No. The big problem is that the user has to wait 5 seconds and press Yes for each email.
I think I understand what Microsoft is trying to do here but hope there is a way around it without asking users to go back to Outlook 2000.
Thanks for any help.