Looking for a simple vb code to save and send worksheet as PDF.
I don't need to have the email addresses in the code but just attach the PDF worksheet
And open outlook so can select the emails addresses.
Looking for a simple vb code to save and send worksheet as PDF.
I don't need to have the email addresses in the code but just attach the PDF worksheet
And open outlook so can select the emails addresses.
Hi, wayneao,
please have a look at Create and Mail PDF files with Excel 2007/2013 (with option for a download of a sample workbook) and see if the article helps with your problem.
Ciao,
Holger
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
I tried with the link but it's,to complicated for me. I have just begun with excel,
I wanted a simple way to open outlook with the attachment of the worksheet so I can select the email address.
Because the emails are to many and different I thought it would be good if I choose the when outlook opens.
This works well except the except I don't want to use the workbook name or the worksheet name in the title of the PDF attachment. Reason each month the worksheet changes it's pdf or printed name.
How can I eliminate using the part of the code that includes the workbook and worksheet names?
![]()
Please Login or Register to view this content.
Last edited by wayneao; 07-19-2014 at 07:05 AM.
This works well except the except I don't want to use the workbook name or the worksheet name in the title of the PDF attachment. Reason each month the worksheet changes it's pdf or printed name.
How can I eliminate using the part of the code that includes the workbook and worksheet names?
Can I use a imput box to enter the name of the worksheet ?
![]()
Please Login or Register to view this content.
Last edited by wayneao; 07-19-2014 at 07:04 AM.
This works well except the except I don't want to use the workbook name or the worksheet name in the title of the PDF attachment. Reason each month the worksheet changes it's pdf or printed name.
How can I eliminate using the part of the code that includes the workbook and worksheet names?
![]()
Please Login or Register to view this content.
Last edited by wayneao; 07-19-2014 at 07:03 AM.
Hi, wayneao,
Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.
Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.
Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
Ciao,
Holger
Hi, wayneao,
the code line
fills the variable which holds the name for the document.![]()
Please Login or Register to view this content.
You may try
or![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Ciao,![]()
Please Login or Register to view this content.
Holger
The author suggested by HaHoBe also wrote an add-in. Very easy to install and use http://www.rondebruin.nl/win/addins/rdbmail.htm
Here the code:
[/CODE]![]()
Please Login or Register to view this content.
However nothing happened. Did I place the code in the wrong area. Also nothing was attached. Excel is all new to me. Sorry for the questions.
Hi, wayneao,
placing On Error Resume Next makes the code work as if no error occurred and resultimng in not getting the proper result. I should habve noted earlier on that you should not name your variable FileName which is a VBA Keyword. And to concatenate String the ampersand is used.
Give this a try:
Ciao,![]()
Please Login or Register to view this content.
Holger
got a error message for
.Attachments.Add strFileName
connot find this file
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks