Thanks.
Dmitry
"dmu" <a@a> wrote in message news:#NUHcRFRAHA.210@cppssbbsa03...
"Dmitry Streblechenko" <dmi...@saleslogix.com> wrote in message
news:u0JPfpFRAHA.295@cppssbbsa03...
Dmitry
"dmu" <a@a> wrote in message news:#LvAjVGRAHA.256@cppssbbsa03...
I asked a similar question (minus the Access bit) and R Bray was kind
enough to provide me with the following macro to send all from the
drafts folder.
I only understand about half the code, but it does work, for emails
and faxes.
Good luck with it.
--
Harry Whodini
Master criminologist and escapologist
Public Sub SendDrafts()
Dim lDraftItem As Long
Dim myOutlook As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolders As Outlook.Folders
Dim myDraftsFolder As Outlook.MAPIFolder
'Send all items in the "Drafts" folder that have a "To" address filled
in.
'Setup Outlook
Set myOutlook = Outlook.Application
Set myNameSpace = myOutlook.GetNamespace("MAPI")
Set myFolders = myNameSpace.Folders
'Set Draft Folder. This will need modification based on where it's
being run.
Set myDraftsFolder = myFolders("Personal Folders").Folders("Drafts")
'Loop through all Draft Items
For lDraftItem = myDraftsFolder.Items.Count To 1 Step -1
'Check for "To" address and only send if "To" is filled in.
If Len(Trim(myDraftsFolder.Items.Item(lDraftItem).To)) > 0 Then
'Send Item
myDraftsFolder.Items.Item(lDraftItem).Send
End If
Next lDraftItem
'Clean-up
Set myDraftsFolder = Nothing
Set myNameSpace = Nothing
Set myOutlook = Nothing
End Sub
dmu <a@a> wrote in message news:#NUHcRFRAHA.210@cppssbbsa03...
: We have VBA code in Access that creates a bunch (anywhere from 3 to
:
:
"harry whodini" <harry_...@yahoo.com> wrote in message
news:u1Aq7$GRAHA.235@cppssbbsa03...