Q
qwerty123456
Hello,
can someone tell me why this stupid program works if I run manually Outlook
2007, but doesn't work when Outlook2007 is not in execution?
The error is when accessing the Recipients collection. But I can't
understand why it works if Outlook 2007 is running previously I ran the
script.
Many thanks to all who will answer.
Luca D
' Copy the following text and put it into a new text file with the .vbs
extention
Dim oApp, oMail
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.createitem(0)
oMail.subject = "Email Subject"
oMail.body = "hello all"
oMail.recipients.add("(e-mail address removed)")
oMail.send()
' uncomment the following to close Outlook
'oApp.quit()
can someone tell me why this stupid program works if I run manually Outlook
2007, but doesn't work when Outlook2007 is not in execution?
The error is when accessing the Recipients collection. But I can't
understand why it works if Outlook 2007 is running previously I ran the
script.
Many thanks to all who will answer.
Luca D
' Copy the following text and put it into a new text file with the .vbs
extention
Dim oApp, oMail
Set oApp = CreateObject("Outlook.Application")
Set oMail = oApp.createitem(0)
oMail.subject = "Email Subject"
oMail.body = "hello all"
oMail.recipients.add("(e-mail address removed)")
oMail.send()
' uncomment the following to close Outlook
'oApp.quit()