hi
i have a little problem trying to automate outlook using a cognos .mac file.
i am not skilled in this field but would like a little help please if possible
i am trying to use cognos scheduler to run a job , then open outlook and send this to a user.this i would like to do out of office hours.
the problem i have a message box appear on screen
with the following message.
A PROGRAM IS TRYING TO AUTOMATICALLY SEND E-MAIL ON YOUR BEHALF.DO YOU WANT TO ALLOW THIS.
CHOOSE YES, NO OR HELP
IF THIS IS UNEXPECTED ,IT MAY BE A VIRUS AND YOU SHOULD SAY NO.
if i click yes the job runs ok and send off the e-mail.super stuff wow
so to the question
can the choose yes button be written into the macro somehow?? or somehow tick a box in outlook which turns this off? so i can use this to run, schedule and post off the results.
i have attached the code which i picked up from this site and tried to use
if anyone knows how to do this can they please just insert the required lines
sub main()
Dim objOutlook As Object
Dim objOutlookEmail As Object
Dim objOutlookAttachments As Object
Set objOutlook = CreateObject("Outlook.Application"
Set objOutlookEmail = objOutlook.CreateItem(OlMailItem)
objOutlookEmail.Subject = "Daily update"
objOutlookEmail.Body = "Please find attached your daily file"
objOutlookEmail.To = "someone@aol.com"
Set objOutlookAttachments = objOutlookEmail.Attachments
objOutlookAttachments.Add "c:\TEST.xls"
objOutlookEmail.Display
objOutlookEmail.Send
Set objOutlook = Nothing
Set objOutlookEmail = Nothing
Set objOutlookAttachments = Nothing
End Sub
kind regards
pam
i have a little problem trying to automate outlook using a cognos .mac file.
i am not skilled in this field but would like a little help please if possible
i am trying to use cognos scheduler to run a job , then open outlook and send this to a user.this i would like to do out of office hours.
the problem i have a message box appear on screen
with the following message.
A PROGRAM IS TRYING TO AUTOMATICALLY SEND E-MAIL ON YOUR BEHALF.DO YOU WANT TO ALLOW THIS.
CHOOSE YES, NO OR HELP
IF THIS IS UNEXPECTED ,IT MAY BE A VIRUS AND YOU SHOULD SAY NO.
if i click yes the job runs ok and send off the e-mail.super stuff wow
so to the question
can the choose yes button be written into the macro somehow?? or somehow tick a box in outlook which turns this off? so i can use this to run, schedule and post off the results.
i have attached the code which i picked up from this site and tried to use
if anyone knows how to do this can they please just insert the required lines
sub main()
Dim objOutlook As Object
Dim objOutlookEmail As Object
Dim objOutlookAttachments As Object
Set objOutlook = CreateObject("Outlook.Application"
Set objOutlookEmail = objOutlook.CreateItem(OlMailItem)
objOutlookEmail.Subject = "Daily update"
objOutlookEmail.Body = "Please find attached your daily file"
objOutlookEmail.To = "someone@aol.com"
Set objOutlookAttachments = objOutlookEmail.Attachments
objOutlookAttachments.Add "c:\TEST.xls"
objOutlookEmail.Display
objOutlookEmail.Send
Set objOutlook = Nothing
Set objOutlookEmail = Nothing
Set objOutlookAttachments = Nothing
End Sub
kind regards
pam