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,
 

Some videos you may like

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

pieter89

New Member
Joined
Dec 2, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
To activate the macro I will use an button on the input sheet.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,206
Messages
5,600,317
Members
414,376
Latest member
NickYOW

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
Top