P
Procuro
Can some one help me, since I'm getting despaired.
I've been using the peace of code below to send messages
through Oulook. Until now everything has been going fine
and smoothly, but since I've begun using windows XP, I've
been receiving the following message
....trying to automatically send e-mail on your behalf .
chose yes ..
Is there a way, programmatically, to work around it, I
mean to force the yes so the message can be dealt with
automatically?
Thanks
Dim objApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFoldSent As Outlook.mapiFolder
Dim Mail_msg As MailItem
Set objApp = CreateObject("Outlook.Application")
Set myNamespace = objApp.GetNamespace("MAPI")
Set myFoldSent = myNamespace.GetDefaultFolder
(olFolderSentMail)
Set Mail_msg = objApp.CreateItem(olMailItem)
Mail_msg.Subject = "Algo."
Mail_msg.Body = "O que se quiser." _
& vbNewLine & vbNewLine _
& "Algo mais!"
Mail_msg.To = "some one"
Mail_msg.Send
Set Mail_msg = Nothing
Set myFoldSent = Nothing
Set myNamespace = Nothing
Set objApp = Nothing
I've been using the peace of code below to send messages
through Oulook. Until now everything has been going fine
and smoothly, but since I've begun using windows XP, I've
been receiving the following message
....trying to automatically send e-mail on your behalf .
chose yes ..
Is there a way, programmatically, to work around it, I
mean to force the yes so the message can be dealt with
automatically?
Thanks
Dim objApp As Outlook.Application
Dim myNamespace As Outlook.NameSpace
Dim myFoldSent As Outlook.mapiFolder
Dim Mail_msg As MailItem
Set objApp = CreateObject("Outlook.Application")
Set myNamespace = objApp.GetNamespace("MAPI")
Set myFoldSent = myNamespace.GetDefaultFolder
(olFolderSentMail)
Set Mail_msg = objApp.CreateItem(olMailItem)
Mail_msg.Subject = "Algo."
Mail_msg.Body = "O que se quiser." _
& vbNewLine & vbNewLine _
& "Algo mais!"
Mail_msg.To = "some one"
Mail_msg.Send
Set Mail_msg = Nothing
Set myFoldSent = Nothing
Set myNamespace = Nothing
Set objApp = Nothing