Outlook Renaming PDFs Created From Excel WB

motherteresa

Board Regular
Joined
Nov 11, 2010
Messages
81
I recently purchased an HP laptop. I am running Microsoft Office 365 for business. I use some workbooks for clients that are VBA-heavy. One of the VBAs I employ prints out by clicking on a command button PDFs of the testing our company provides. Those PDFs are automatically saved into the same folder as the workbook. They are named in the following format:

Client Test Date (ie - ALL SAINTS SURGERY CHEMICAL 03.22.23)
When it comes time to send reports to the client, I click on another command button that creates an email in Microsoft Outlook, with the recipient email(s), subject, and body of the email. It also attaches select PDFs. Here's the problem...when the PDFs are attached to the email, the name is changed to include the %20 symbols in place of where the spaces were. So the above example becomes ALL%20SAINTS%20SURGERY%20CHEMICAL%2003.22.23...which is disastrous!!!

My secondary problem is that the VBA that attaches the PDFs was designed to only attach specific PDFs to the client email (ie - Only the PDFs that were created/printed) and to the home office email (the same, but with an additional Recap Invoice PDF). However, now if a PDF is NOT created/printed...it shows up as an attachment that says "download failed." It obviously failed because it's not in the folder. But why is it now showing up in the email as a failed download?? When I sent a test email to myself, that PDF that is not supposed to be attached IS attached, but with a d.docs.live.net designation. If clicked upon, it takes me to OneDrive.

I am going crazy!!! How do I stop all this from happening, please? I feel like this new laptop is possessed.
 

Attachments

  • Changed PDFs.png
    Changed PDFs.png
    23.7 KB · Views: 9

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
By the way, I learned just now that if I just create the email manually and copy/paste the PDFs, everything looks fine. The PDFs remain named as usual.
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,020
Members
452,542
Latest member
Bricklin

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