Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default !!Macro to attach pdf and reference excel!!

Hi Boys and Girls,

I need a bit of help with some macros. I am trying to create a macro
that would automatically attach an pdf file to an email. Easy right?
Well, the thing is that based on the receipient the file that is
attached will change.

So, when I attach the file it needs to reference a paticular cell and
the path will indicate which file it should attach.

If .attachments.add isn't he right approach, what would be?

I have outlook 2000 and have the following macro already....any help
would be awesome...THANK YOU!

With olMyEmail
.To = ActiveCell.Text
.CC = ActiveCell.Offset(0, 1).Text
.Subject = ActiveCell.Offset(0, 2).Text
.Body = ActiveCell.Offset(0, 3).Text
.Attachments.Add ----- NEED HELP HERE TO LOCATE FILE IN EXCEL CELL

.Save
End With

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default !!Macro to attach pdf and reference excel!!

.Attachments.Add Range("B9").Value

perhaps.

or
.Attachments.Add ActiveCell.offset(0,4).Value

--
Regards,
Tom Ogilvy



" wrote:

Hi Boys and Girls,

I need a bit of help with some macros. I am trying to create a macro
that would automatically attach an pdf file to an email. Easy right?
Well, the thing is that based on the receipient the file that is
attached will change.

So, when I attach the file it needs to reference a paticular cell and
the path will indicate which file it should attach.

If .attachments.add isn't he right approach, what would be?

I have outlook 2000 and have the following macro already....any help
would be awesome...THANK YOU!

With olMyEmail
.To = ActiveCell.Text
.CC = ActiveCell.Offset(0, 1).Text
.Subject = ActiveCell.Offset(0, 2).Text
.Body = ActiveCell.Offset(0, 3).Text
.Attachments.Add ----- NEED HELP HERE TO LOCATE FILE IN EXCEL CELL

.Save
End With


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Attach macro to a cell Marco Excel Discussion (Misc queries) 4 October 31st 07 12:22 AM
Excel macro to attach files in Outlook 2000 [email protected] Excel Programming 1 February 20th 07 08:47 PM
Automatically attach Excel spreadsheet to Outlook Email with Macro? nbaj2k[_2_] Excel Programming 6 August 1st 06 04:41 PM
How do you attach a macro in excel 2003? James Excel Discussion (Misc queries) 1 April 21st 05 04:51 PM
De-Attach Macro?? Is there any way? marika1981 Excel Discussion (Misc queries) 13 January 8th 05 03:13 PM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"