View Single Post
  #4  
Old June 11th 07, 09:09 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...



What version do you use?

--
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 Sat, 9 Jun 2007 21:07:00 -0700 schrieb Cheryl1325:

Hello Michael,

I'm wondering if you could advise how I'd go about this, as i could not

get
what you earlier advised to work for me.

I did neglect to advise that I manage countless e-mails being sent out for
some 20+ individuals and was hoping to set a simple macro button for each

of
2 possible files to be sent out by any of the 20+. That means I would

simply
substitute e-mail senders and their one of two possible files in whatever
code, for 40 macros in total.

What I'd like to do the simple equivalent of follows:

--Ctrl-N for new e-mail;
--Assert sender's e-mail account;
--Insert Subject Matter "In response to your request...";
--Attach "XXXXXX.pdf";
--In mail's text box, insert contents of c:\yyyyyy.txt above existing
signature that automatically comes in by applying account of e-mail sender
(If, as a result of the macro's use, it won't come in as always, then I'll
add it to the incoming text file.
--Goto after the greeting "Dear " at the top of the text message so I can
type the recipient's name and a comma;
[--After ENTER is hit... Go to "TO:" box so I can enter the recipient's
e-mail address];

Then, I'll view everything and hit SEND.

Much of what I need here and so much more is available to be seen, no

doubt,
on-screen in Office; I only wish I knew where, so I can begin to learn

this.
I'm a 20-year+ veteran of Lotus 1-2-3 code and I'm surely willing and able

to
begin soon as I know how.

I can probably get this done (or close) with my X-Keys programmable
keyboard, but I'd like to lose it and get started with VBA.

Many thanks.





"Michael Bauer [MVP - Outlook]" wrote:



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