View Single Post
  #2  
Old June 7th 07, 06:06 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Macro for mailing same PDF from same account regularly...



I'd use a template, stored in the Drafts folder, with the subject and send
account pre-filled.

If the subject is unique you can get the item with:

Dim Mail as Outlook.MailItem
Dim Folder as Outlook.Mapifolder

Set Folder=Application.Session.GetDefaultFolder(olFold erDrafts)
Set Mail=Folder.items("subject here")

Add the attachment by calling the item's Attchments.Add method:

Mail.Attachments.Add "c:\yyy.pdf"

Write the txt file's content into the items Body property. Here's a sample
for reading files:

http://www.vboffice.net/sample.html?...4&cmd=showitem

And add the recipients to the item's Recipients.Add method.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Quick-Cats - Categorize Outlook data:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Wed, 6 Jun 2007 10:54:01 -0700 schrieb Cheryl1325:

Hundreds of times daily, I need to send the identical PDF file to numerous
e-mail addresses ... one at a time. I'm New to Outlook macros, wondering

if
this is possible:

Set Sender E-Mail Account as "
Place text "xxxxxxxxx" in "Subject" box;
Attach PDF file "YYY.PDF"
In text box, (open and) copy text contents of c:\TextToSend.txt
Go to "To" box, for my entry of recipient e-mail address

I've almost done it with the basic Record function that Outlook makes
available; however, recording stops if I tab-backspace out of the text

box.

I'd love to get into basic VBA coding, don't know where on MS site to look
for all possible commands.

Any help would be appreciated.

Ads