Hi All
I am looking to print/save multiple PDF documents on one sheet however I need one variable to change before it saves/prints to PDF. Currently I have the following macro which "works" however it requires me to type in a file name, choose a file path and then click save on each and every print:
Sub DateToForm()
Dim MyRange As Range, MyVal As Range, LR As Long
LR = Sheets("Client statements").Range("A" & Rows.Count).End(xlUp).Row
Set MyRange = Sheets("Client statements").Range("A5:A" & LR)
For Each MyVal In MyRange
Sheets("Statements").[A10].Value = MyVal.Value
Sheets("Statements").PrintOut Copies:=1
Next MyVal
Sheets("Statements").[A10].Value = ""
End Sub
Could someone help me add to the macro so that it:
- Fills in the file name from a specific cell on the Sheets("Statements")
- Save all PDF so a file path located on Sheets("Statements") in cell i2
- perform this without having to click save/print each time it loops
Thank you in advance to anyone that helps.
I am looking to print/save multiple PDF documents on one sheet however I need one variable to change before it saves/prints to PDF. Currently I have the following macro which "works" however it requires me to type in a file name, choose a file path and then click save on each and every print:
Sub DateToForm()
Dim MyRange As Range, MyVal As Range, LR As Long
LR = Sheets("Client statements").Range("A" & Rows.Count).End(xlUp).Row
Set MyRange = Sheets("Client statements").Range("A5:A" & LR)
For Each MyVal In MyRange
Sheets("Statements").[A10].Value = MyVal.Value
Sheets("Statements").PrintOut Copies:=1
Next MyVal
Sheets("Statements").[A10].Value = ""
End Sub
Could someone help me add to the macro so that it:
- Fills in the file name from a specific cell on the Sheets("Statements")
- Save all PDF so a file path located on Sheets("Statements") in cell i2
- perform this without having to click save/print each time it loops
Thank you in advance to anyone that helps.