B
Bob B.
I have an ACCESS database that writes anywhere from 1 to 3 reports to a
static directory (C:\Mfg_Software\EMails\FileName.pdf). The directory is
emptied by the code prior to writing the pdf's so the only files in it are
the ones I want to send. What I would like to do is press a button and have
it attach all files from that directory to my note. I found the following
example from Eric Legault from 8/23/2005 that looked like it would work but I
can't get it to.
Sub AddAttachments()
Dim objItem As Object
If ActiveExplorer.Selection.Count = 0 Then Exit Sub
For Each objItem In ActiveExplorer.Selecion
objItem.Attachments.Add ("C:\Mfg_Software\EMails\147.pdf")
objItem.Save
Next
End Sub
I am using a static file name in this example but can handle the multiple
names through code if I can just get the Attachment to work. Can anyone out
there give me some insight as to what I am doing wrong? I have Outlook 2003
and tried using this as a macro from the Main Outlook screen as well as from
inside a new note.
Thank You in advance for any help you can give me.
Regards,
Bob
static directory (C:\Mfg_Software\EMails\FileName.pdf). The directory is
emptied by the code prior to writing the pdf's so the only files in it are
the ones I want to send. What I would like to do is press a button and have
it attach all files from that directory to my note. I found the following
example from Eric Legault from 8/23/2005 that looked like it would work but I
can't get it to.
Sub AddAttachments()
Dim objItem As Object
If ActiveExplorer.Selection.Count = 0 Then Exit Sub
For Each objItem In ActiveExplorer.Selecion
objItem.Attachments.Add ("C:\Mfg_Software\EMails\147.pdf")
objItem.Save
Next
End Sub
I am using a static file name in this example but can handle the multiple
names through code if I can just get the Attachment to work. Can anyone out
there give me some insight as to what I am doing wrong? I have Outlook 2003
and tried using this as a macro from the Main Outlook screen as well as from
inside a new note.
Thank You in advance for any help you can give me.
Regards,
Bob