Return to site

C Excel Exportasfixedformat Pdf

broken image


Excel - VBA - ExportAsFixedFormat PDF File Size too Large. However, the actual file size when using my macro results in a file size two or three times larger then if I were to manually, in Excel, go to the Acrobat tab and create PDF. I need to reduce the file size of the pdf further. I've set a small print area, tried using minimumquality. ExportAsFixedFormat to PDF - Issue with Dots in Filename I am trying to export excel files to PDF using VBA. The exporting function works fine, but I am unable to successfully add dots/periods to the filename. The following code example saves one page of the chart Chart_1 of worksheet Sheet1 in PDF format to the specified file path and file name using the standard quality resolution. The generated PDF file includes the workbook properties. To run this code example, your workbook must include a sheet named Sheet1 with a chart named Chart_1.

expression.ExportAsFixedFormat(Format, Filename,Intent,IncludeDocumentProperties, ColorDownsampleTarget, ColorDownsampleThreshold, OneBitDownsampleTarget, OneBitDownsampleThreshold,From,To,Copies,Collate,PrintStyle,DocStructureTags,BitmapMissingFonts,UseISO19005_1,ExternalExporter)

Have you tried setting 'Intent' to a different value? That will impact the size of the file produced.

Possible values for the Intent parameter are shown in the following table and declared in PbFixedFormatIntent in the Publisher type library.

ConstantValueDescription

pbIntentMinimum

1

Squeeze the publication to the smallest file size. This satisfies the on-screen viewing scenario where the publication is viewed on a computer monitor.

pbIntentStandard

2

Distribute the publication as an e-mail message or from a Web site. Note that the user does not know how the publication will be viewed: on-screen or printed from a desktop printer. Both the desktop printing scenario and the on-screen viewing scenario must be met by this intent.

pbIntentPrinting

3

Print the publication on a desktop printer or at a copy store.

pbIntentCommercial

4

Submit the publication to a commercial press

-->

Exports to a file of the specified format.

Syntax

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

expression A variable that represents a Range object.

Parameters

Vba Excel Exportasfixedformat

NameRequired/OptionalData typeDescription
TypeRequiredXlFixedFormatTypeThe type of file format to export to.
FileNameOptionalVariantThe file name of the file to be saved. You can include a full path, or Excel saves the file in the current folder.
QualityOptionalVariantOptional XlFixedFormatQuality. Specifies the quality of the published file.
IncludeDocPropertiesOptionalVariantTrue to include the document properties; otherwise, False.
IgnorePrintAreasOptionalVariantTrue to ignore any print areas set when publishing; otherwise, False.
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.
OpenAfterPublishOptionalVariantTrue to display the file in the viewer after it is published; otherwise, False.
FixedFormatExtClassPtrOptionalVariantPointer to the FixedFormatExt class.

C Excel Exportasfixedformat Pdf Online

Remarks

This method also supports initializing an add-in to export a file to a fixed-format file. For example, Excel will perform file format conversion if the converters are present. The conversion is usually initiated by the user.

C Excel Exportasfixedformat Pdf Landscape

Online

Support and feedback

C Excel Exportasfixedformat Pdf Free

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.





broken image