VBA Save specific sheet to PDF with name build from cell values, e-mail afterwards

pieter89

New Member
Joined
Dec 2, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I have searched the forum to find a solution but did not come across the right solution (I think).
Could you please help me with the following?

I am searching for a VBA code that saves not the activesheet but an specific sheet (Book-out formulier intern) to PDF.
The file name should be based on a combination of 2 cell values and a fixed text (Book-out, B4 - D12) (cell vallues not of the active sheet but from the specific sheet (Book-out formulier intern).
The file should always be saved to the same (fixed) folder (C:\Users\piete\OneDrive\Book-outs\.

After saving the file should be attached to an e-mail (via outlook) and the subject should be the file name.
TO should be filled in via outlook, CC should be 3 fixed e-mail adresses.

Kind regards,
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
To activate the macro I will use an button on the input sheet.
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,834
Members
449,051
Latest member
excelquestion515

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