Muokkaa

Jaa


WebOptions.AllowPNG property (Excel)

True if Portable Network Graphics (PNG) is allowed as an image format when you save documents as a webpage. False if PNG is not allowed as an output format. The default value is False. Read/write Boolean.

Syntax

expression.AllowPNG

expression A variable that represents a WebOptions object.

Remarks

If you save images in the PNG format as opposed to any other file format, you might improve the image quality or reduce the size of those image files, and therefore decrease the download time, assuming that the web browsers that you are targeting support the PNG format.

Example

This example enables PNG as an output format for the first workbook.

Application.Workbooks(1).WebOptions.AllowPNG = True

Alternatively, PNG can be enabled as the global default for the application for newly created documents.

Application.DefaultWebOptions.AllowPNG = True

Support and feedback

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.