AnsweredAssumed Answered

'ViewPdfAfterSaving = False' Not working.

Question asked by Robert Voogt on Jun 8, 2018
Latest reply on Jun 9, 2018 by Deepak Gupta
        swApp.SetUserPreferenceToggle swUserPreferenceToggle_e.swPDFExportHighQuality, True
        
        fileRevision = swModel.CustomInfo("Revision")
        fileArtNr = swModel.CustomInfo("ArtNr")
        If configuration Like "*CW*" Then
          newFileName = fileArtNr & "_" & configuration & "_" & fileRevision & ".PDF"
        Else
          newFileName = fileArtNr & "_" & fileRevision & ".PDF"
        End If
        
        Set swExportPDFData = swApp.GetExportFileData(1)
        swExportPDFData.ViewPdfAfterSaving = False
        
        longstatus = swModel.SaveAs3("D:\Spare Part Generator\Manuals Release Drawings\" & newFileName, 0, 0)

 

Hi all,

 

I have a feeling that I'm doing this wrong. The files saves correctly but it opens adobe acrobat.

I know that manually turning it off once works, but when it's in code, I'm sure it will never accidentally happen.

Outcomes