Attatching an already embedded PDF to an Email.

CBurgess

Board Regular
Joined
Oct 29, 2013
Messages
65
Okay, my problem is as follows:

My "Drawing" is embedded on Sheet1, later on in Sheet12 I click a button that'll send an automatic email to a user. I want to attatch the embedded PDF onto this email if it is at all possible??

Code:
  Dim Drawing As Object

After I've declared my variables I've tried setting the variable "Drawing" to the object, this is where I'm encountering my errors mainly "Type Mismatch" or Object Variable not set...


Code:
    Sheets("Menu").Visible = True
    Drawing = Sheet1.Shapes.range(Array("Drawing"))
    Selection.Verb Verb:=xlPrimary
    Sheets("Menu").Visible = False

At the bottom of the code, this is where i pull in the object

Code:
        .To = Sheet12.range("L8")
        .CC = ""
        .BCC = ""
        .Subject = "Arrange P&D Request"
        .htmlbody = strbody & vbNewLine & Signature
        .Attachments.Add ("Drawing")

Cheers guys, you're help is appreciated.
 
Yeah im getting confused too. Never though you can embedded pdf files onto excel hahah :P
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Not really, I appreciate the help but I can't give out the file and give it to people, it's all got to be stored inside this one Excel Database, so if I can't pull an attatchment from an embedded sheet I'll just not include it. :smile:
 
Upvote 0
File > Insert > Object > PDF

Then I hide the object.

So a Datasheet will be hidden, once the relevant information is entered and user clicks the button the correct DataSheet then becomes visible and appears, It's all magic really, but I want to be able to send it with an email as well. All automatically ha
 
Upvote 0
I know this is probably bugging you but i'm somewhat confused. Like automatically you mean like. As soon as that person receives that excel file with the embedded pdf file in it, You want it to open the PDF inside the excel file with the other personal information? :D

Reply asap
 
Upvote 0
Oh no,

Basically I sent Excel file to the very lucky user,

He goes through it with a customer, choosing what they may or may not want, all the options would be stored and are automatically structured into an email template that is sent once the user clicks Raise P&D.

There is a PDF stored inside the excel sheet that's sort of a "key" that can be accessed by the user, but they wont have a local copy of it. The PDF will then "hopefully" be sent along with the email, to help anyone understand what is requested from them.
 
Upvote 0
Okay so im gonna edit the code which will be very easy and ill explain what to do. Give me a good 5 minutes :)
 
Upvote 0

Forum statistics

Threads
1,223,577
Messages
6,173,162
Members
452,503
Latest member
AM74

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top