hi,
I have userform with textbox "FileName" and "Send" button.
I need to save current sheet "Sheet1" as PDF and name it as entered in "FileName" then attach it to outlook once you click "Send"
Please help!
hi,
I have userform with textbox "FileName" and "Send" button.
I need to save current sheet "Sheet1" as PDF and name it as entered in "FileName" then attach it to outlook once you click "Send"
Please help!
Hi,
try this
Dont forget to select Outlook Object Library in the references under Tools
Sean
![]()
Please Login or Register to view this content.
Hi thank you for the code! I am getting an error tho,
Run-time error '1004'.
Application-defined or operation-defined error.
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName1:=Fname
Ive created a new excel file with new userform and when i run the code it doest attach the PDF
Last edited by kaurka; 11-01-2012 at 06:37 PM.
Hi,
try this one
ive tested it and it works ok
![]()
Please Login or Register to view this content.
Sean.
This line keeps giving me issues
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:=FName
Finally worked! God bless!
Sean,
Unfortunately i am getting an error when i try the code on my Sheet with multiple data. It works fine on new sheet with single cell filled, but when i try running on my sheet with a table it gives me an error
"run-time error '1004' application-defined or object-defined error"
On line:
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName1:=Fname
Please advise!
thx
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks