Excel Vba Examples Pdf

-->

VBA Code Excel Macro Examples – Useful Macros, Codes, 100+ How To explained for Basic Beginners to Advanced VBA users. Tutorials to learn Excel 2003, 2007, 2010, 2013 Macros and Mastering in VBA. Selected examples to deal with different objects, methods and properties in Excel.

The ExportAsFixedFormat method is used to publish a workbook to either the PDF or XPS format.

Syntax

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

expression A variable that represents a Workbook object.

Pdf

Parameters

Excel Vba Examples Pdf Free Download

NameRequired/OptionalData typeDescription
TypeRequiredXlFixedFormatTypeCan be either xlTypePDF or xlTypeXPS.
FileNameOptionalVariantA string that indicates the name of the file to be saved. You can include a full path, or Excel saves the file in the current folder.
QualityOptionalVariantCan be set to either of the following XlFixedFormatQuality constants: xlQualityStandard or xlQualityMinimum.
IncludeDocPropertiesOptionalVariantSet to True to indicate that document properties should be included, or set to False to indicate that they are omitted.
IgnorePrintAreasOptionalVariantIf set to True, ignores any print areas set when publishing. If set to False, uses the print areas set when publishing.
FromOptionalVariantThe number of the page at which to start publishing. If this argument is omitted, publishing starts at the beginning.
ToOptionalVariantThe number of the last page to publish. If this argument is omitted, publishing ends with the last page.
OpenAfterPublishOptionalVariantIf set to True, displays the file in the viewer after it is published. If set to False, the file is published but not displayed.
FixedFormatExtClassPtrOptionalVariantPointer to the FixedFormatExt class.

Example

Excel Vba Examples Pdf Download

The following example creates the PDF at standard quality in the current file's directory and displays the file in the viewer after it is published. An error occurs if the PDF add-in is not currently installed.

Excel Vba Examples Pdf Free

Support and feedback

Excel Vba Userform Examples Pdf

Holy macro 2500 excel vba examples pdf

100 Excel Vba Examples Pdf

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.