ilearnautoit Posted April 24, 2008 Posted April 24, 2008 This is what I want to do: When I run the autoit script I want it to name a PDF file to whatever I have in a cell reference when using excel. I will be using this script in excel to complete the printing process. As you will see below , I have the information saved to the clipboard but have been stuck at this point. Sub PDFsave() Application.CutCopyMode = False Application.EnableEvents = False Dim cname, invnum Dim fpath As String fpath = "SHEET NAME" With Worksheets("Sheet1") invnum = Range("A1").Value cname = Range("A2").Value FDate = Format(Range("A4"), "ddmmyy") Range("A5").Value = invnum & " " & fpath & " " & cname & " " & FDate & ".pdf" Range("A5").Select 'send to clipboard Selection.Copy End With Application.ActivePrinter = "PDFCreator on Ne00:" Activewindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _ "PDFCreator on Ne01:", Collate:=True 'code here to run AutoIt End Sub Any ideas?
ilearnautoit Posted April 24, 2008 Author Posted April 24, 2008 (edited) I worked it out. all I had to do was place this code after the printer pops up. Range("A5").Select 'send to clipboard Selection.Copy PS. This script in this post is NOT for Autoit, it is VBA script. >>>> This Post is Closed <<<< Edited April 24, 2008 by ilearnautoit
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now