ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   !!Macro to attach pdf and reference excel!! (https://www.excelbanter.com/excel-programming/382020-macro-attach-pdf-reference-excel.html)

[email protected]

!!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


Tom Ogilvy

!!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




All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com