i.e. the link between page and country?
each page number has been assigned a counbtry and this is fixed in stone and cannot change and the following page number corrspond to the following countries...
Page1 = Argentine
page2= Australia
page3= Austria
page4= Belgium
page5= Brazil
page6= Canada
page7= Chile
page8= China
page9= Colombia
page10= Czech Rep
i want the macro to run so that it inserts the following names into the file save as (box) next to filename(as shown in screen print document 2) countryname.pdf
and so on move through the above list of countries...
countryname = as shown above.
Sub PrintToPDF()
FilePrint FromPage:=1, ToPage:=1, FromDate:="01/07/08 08:00", ToDate:="31/03/12 17:00"
SelectTaskField Row:=-4, Column:="Baseline Finish"
SelectTaskField Row:=-1, Column:="Name"
FilePrint FromPage:=2, ToPage:=2, FromDate:="01/07/08 08:00", ToDate:="31/03/12 17:00"
SelectTaskField Row:=-4, Column:="Baseline Finish"
SelectTaskField Row:=-1, Column:="Name"
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim PDFFilePath As String
If SaveAsUI Then
PDFFilePath = CreateObject("WScript.Shell").Specialfolders("MyDocuments") & "\" & ThisProject.Name & ".pdf"
If Not FilePath = "False" Then
ThisProject.SaveAs FilePath
End If
Cancel = True
End If
End Sub