Hello,
I am currently working on a project that requires me to save the excel sheet as a word doc. After which the word doc will be saved as a pdf as well. I need all this to run using a vba code. Currently i have been able to code until the saving as a word doc. I am not sure how to continue code the saving of the word doc as a pdf automatically. I have managed to save the excel sheet as a pdf but the formatting gets all off. So instead I just need the saved word doc instead to be converted to pdf.
I am using Excel 2003 so i am using CutePDF as a PdfWriter.
Thanks. Any help would be appreciated.
Below is the code i am using to save the excel sheet as pdf
I am currently working on a project that requires me to save the excel sheet as a word doc. After which the word doc will be saved as a pdf as well. I need all this to run using a vba code. Currently i have been able to code until the saving as a word doc. I am not sure how to continue code the saving of the word doc as a pdf automatically. I have managed to save the excel sheet as a pdf but the formatting gets all off. So instead I just need the saved word doc instead to be converted to pdf.
I am using Excel 2003 so i am using CutePDF as a PdfWriter.
Thanks. Any help would be appreciated.
Below is the code i am using to save the excel sheet as pdf
Code:
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + 2
waitTime = TimeSerial(newHour, newMinute, newSecond)
Application.Wait waitTime
Filename = Path & "\Memo_" & ActiveSheet.Name & "_" & Month & ".pdf"
SendKeys Filename & "{ENTER}", True