R
richardconers
I have Outlook XP. I have several email items in the draft folder. I
want VBA to send them (i.e., put them in the Outbox so that they can be
sent using send/receive under Tools (the Send/Receive under Tools can
be done manually).
However, when i use VBA code to send a draft email message such as
Dim nsMAPI As Outlook.NameSpace
Set nsMAPI = Outlook.GetNamespace("MAPI")
nsMAPI.Folders.Item(1).Folders.Item(12).Items(1).Send
dim Thing as mailitem
set Thing = nsMAPI.Folders.Item(1).Folders.Item(12).Items(1)
(this line works find; Item(12) is folder for draft emails)
the troublesome code line is
Thing.send
An outlook message pops up warning that a program is trying to send an
email, and asks whether I want to send it or cancel it. The warning
message takes about 5 seconds before giving me a chance to click "yes"
.. If I want to send out multiple emails this is a problem. Can I
suppress this message and have VBA automatically choose to send the
email?
Thank you!
want VBA to send them (i.e., put them in the Outbox so that they can be
sent using send/receive under Tools (the Send/Receive under Tools can
be done manually).
However, when i use VBA code to send a draft email message such as
Dim nsMAPI As Outlook.NameSpace
Set nsMAPI = Outlook.GetNamespace("MAPI")
nsMAPI.Folders.Item(1).Folders.Item(12).Items(1).Send
dim Thing as mailitem
set Thing = nsMAPI.Folders.Item(1).Folders.Item(12).Items(1)
(this line works find; Item(12) is folder for draft emails)
the troublesome code line is
Thing.send
An outlook message pops up warning that a program is trying to send an
email, and asks whether I want to send it or cancel it. The warning
message takes about 5 seconds before giving me a chance to click "yes"
.. If I want to send out multiple emails this is a problem. Can I
suppress this message and have VBA automatically choose to send the
email?
Thank you!