Previous Document Next Document

Object Model Reference : Classes : P : PDFVBASettings : Methods : PDFVBASettings.ShowDialog


PDFVBASettings.ShowDialog

Function ShowDialog() As Boolean

Description

Member of PDFVBASettings

The ShowDialog method displays the Publish To PDF dialog box. A Boolean value is returned.

VBA example

The following VBA example displays the Publish To PDF dialog box. If the user chooses a bitmap-compression method other than JPEG, a warning message is displayed and JPEG compression is applied.

Sub Test()
 Dim ps As PDFVBASettings
 Set ps = ActiveDocument.PDFSettings
 ps.Reset
 If ps.ShowDialog Then Exit Sub
 If ps.BitmapCompression <> pdfJPEG Then
  MsgBox "You must use JPEG bitmap compression."
  ps.BitmapCompression = pdfJPEG
 End If
 ps.JPEGQualityFactor = 150
 ActiveDocument.PublishToPDF "C:\MyDocument.pdf"
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.