A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro for mailing same PDF from same account regularly...



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 6th 07, 06:54 PM posted to microsoft.public.outlook.program_vba
Cheryl1325
external usenet poster
 
Posts: 10
Default Macro for mailing same PDF from same account regularly...

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.
  #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.

  #3  
Old June 10th 07, 05:07 AM posted to microsoft.public.outlook.program_vba
Cheryl1325
external usenet poster
 
Posts: 10
Default Macro for mailing same PDF from same account regularly...

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.


  #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.


  #5  
Old June 11th 07, 04:04 PM posted to microsoft.public.outlook.program_vba
Cheryl1325
external usenet poster
 
Posts: 10
Default Macro for mailing same PDF from same account regularly...

Hello Michael,

Currently 2003; switching soon to 2007.



"Michael Bauer [MVP - Outlook]" wrote:



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.


  #6  
Old June 13th 07, 06:24 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...



In OL 2003 it's not possible to set the Send Account via the Outlook object
model, therefore I suggested to use a template: Create the email manually,
fill in everything that won't change, and click Save; that saves the item in
the Drafts folder. You can create one template for each of your individuals.

Or you use the Redemption (www.dimastr.com) to set the account easily by
code. See RDOMail Account property for a sample
(http://www.dimastr.com/redemption/rdo/default.htm).

Maybe you can assign one toolbar button to the code and send the emails to
all of the people at once, or you'll need something to decide for which
individual the message should be created - as it wouldn't be a good idea to
have one button for each on your toolbar.


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

Am Mon, 11 Jun 2007 08:04:02 -0700 schrieb Cheryl1325:

Hello Michael,

Currently 2003; switching soon to 2007.



"Michael Bauer [MVP - Outlook]" wrote:



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.


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to create new email message with different account as sender Brian Beck Outlook and VBA 1 March 21st 07 11:15 PM
Mailing from current account Synapse Syndrome Outlook - General Queries 2 January 10th 07 06:53 PM
Outlook macro abends but Word macro runs successfully Jreue Outlook and VBA 0 December 13th 06 11:55 PM
e-mailing elmer Outlook Express 1 October 26th 06 05:46 PM
Call macro stored in Excel workbook from Outlook's macro Gvaram Outlook and VBA 5 October 4th 06 06:26 AM


All times are GMT +1. The time now is 05:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.