ExportAsFixedFormat Method [VBA]

Method to export a Calc document to PDF format.

warning

Αυτή η σταθερά, συνάρτηση ή αντικείμενο ενεργοποιείται με την πρόταση Option VBASupport 1 τοποθετημένη πριν τον κώδικα του εκτελέσιμου προγράμματος σε άρθρωμα.


Εικονίδιο προειδοποίησης

Αυτή η σελίδα βοήθειας χρειάζεται παραπέρα εργασία για ορθότητα και ολοκλήρωση. Παρακαλούμε, συμμετάσχετε στο έργο LibreOffice και βοηθήστε μας να γράψουμε τις πληροφορίες που λείπουν. Επισκεφτείτε την ιστοσελίδα μας για τη συγγραφή των περιεχομένων της βοήθειας.


Σύνταξη:

expression.ExportAsFixedFormat (Type, Filename, Quality, IncludeDocProperties, IgnorePrintAreas, From, To, OpenAfterPublish)

Type: Integer, required. Can be either 0 or 1. 0 for "PDF" - Portable Document Format file (.pdf) and 1 for "XPS" - XPS Document (.xps)

note

XPS export format is not supported by LibreOffice.


Filename: String, optional. The file name of the exported file.

Quality: Integer, optional. Can be 0 or 1. 0 is for standard quality, 1 is for minimum quality.

IncludeDocProperties: Boolean, optional. Set to True to indicate that document properties should be included in the exported file, or set to False to suppress the export of document properties.

IgnorePrintAreas: Boolean, optional. If set to True, ignores any print ranges on export. If set to False, honor the print ranges on export.

From:Integer, optional. Page number of the first page to export. If omitted, export starts at the beginning.

To: Integer, optional. Page number of the last page to export. If omitted, export ends with the last page.

OpenAfterPublish:Boolean, optional. If set to True, displays the file in the proper viewer after export. On False, the file is exported but not displayed.

Παράδειγμα:


        Option VBASupport 1
        Sub ExportAsPDF()
            ActiveSheet.ExportAsFixedFormat _
            Type:=0, _
            Filename:=".\ExportAsPDF.pdf", _
            Quality:=0, _
            IncludeDocProperties:=True, _
            IgnorePrintAreas:=False, _
            OpenAfterPublish:=True
        End Sub