- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I know this is something very easy, i've searched and tried several things and can't find the solution.
I get the "End of Statement Expected" error for the Dim lines with following ilogic but it might be related to the first line because that line on its own results in a EarlyRev value of -1 no matter what value is stored in oRevNum. There might be a better solution but all i really want to do is move the previous revision to the obsolete folder prior to making the pdf. Also, how do i set the saveas command to overwrite if the existing file already exists?
oPDFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium)
'Move Prior Rev to Obsolete
If oRevNum>=1 Then
Dim EarlyRev AsString= oRevNum - 1
MessageBox.Show("Did it work"&EarlyRev)
Dim FileCurrent AsString="P:\" & PDF_Folder "\" & FileName & " REV" & EarlyRev & ".pdf"
Dim FileObs AsString= "P:\" & PDF_Folder & "\Obsolete\" FileName & " REV" & EarlyRev & ".pdf"
System.IO.File.Move(FileCurrent, FileObs)
EndIf
Solved! Go to Solution.