View Single Post
 
Old 12-15-2020, 02:10 PM
Purfleet Purfleet is offline Windows 10 Office 2019
Expert
 
Join Date: Jun 2020
Location: Essex
Posts: 345
Purfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to beholdPurfleet is a splendid one to behold
Default

Sending to the printer should be easy enough - just add in activesheet.printout after the activesheet.exportasfixedformat. but this will print our each one every time - might be better to wrap an if around it to ask if the user wants to print

Code:
For Each c In inputRange
    r.Value = c.Value
    fName = c.Value
    '''' Save as pdf
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=FolderName & fName, _
        Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
        
    ActiveSheet.PrintOut
Next c
As for the name instead of a number it must be the fname part that is causing the issue - i am guessing that Cell S2 has the data validation number? but with out seeing the actual file it would be a guess - can you upload the actual file? or at least a test
Reply With Quote