Macro to create a unique folder name, save file, and print a PDF based on cell value

banderson7563

New Member
Joined
Feb 2, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I currently use a spreadsheet to create all my quotes for my customers. Overall I have it pretty clean and quick, but one thing that can save me time is being able to automate creating a folder, saving the file, and printing a PDF to email to the customer. All formats are the same for the quote, so the names are being pulled in from the same spot. My goal is for this macro to:
1. create a new folder in C:\Users\myname\My Files\Quotes - the name for the this file would pull from two spots on the sheet and be "B3 - A19". an example of what this would look like would be "ABC Company - XYZ System"
2. Save the workbook in this newly created folder as "Quote - B3" so in the example above it would be "Quote - ABC Company"
3. Create a PDF saved in the newly created folder with the same name as the workbook - "Quote - B3" so in the example it would be "Quote - ABC Company"

Any help or ideas would be great! Thanks in advance
 
I still don't understand what you need.
Make a recording of a macro and do the steps you need, then copy the macro and paste it here.

Note: Just to clarify, in an excel spreadsheet file you cannot save macros, macros are only saved in Excel Macro-Enabled Workbook.
 
Upvote 0

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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