View Single Post
 
Old 12-05-2017, 06:50 AM
mchlbaudet mchlbaudet is offline Windows 10 Office 2016
Novice
 
Join Date: Dec 2017
Posts: 1
mchlbaudet is on a distinguished road
Default Getting PDF File name from Table

Hi,

I'm printing a word file as PDF but i want to get the filename from:

Table 1
Colum 2
Row 6

How can i add this code into this vba code:

ActivePrinter = "Microsoft Print to PDF"
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentWithMarkup, Copies:=1, Pages:="", PageType:= _
wdPrintAllPages, Collate:=True, Background:=True, PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

If you have another way to save as pdf that's fine for me. I only want to have the name of the document as standard. People need to get the possibility to change the directory as long as it gets the filename from the cell mentioned above.
Reply With Quote