WebOptions.AlwaysSaveInDefaultEncoding property (Publisher)
Returns or sets a Boolean value that specifies whether webpages within a web publication should always be saved by using default encoding. If True, webpages within a publication will always be saved by using the default encoding of the client computer. If False, webpages will not be saved by using default encoding. The default value is False. Read/write.
expression A variable that represents a WebOptions object.
If the AlwaysSaveInDefaultEncoding property is set to True on a given WebOptions object, any subsequent attempts to set the Encoding property on that object will be ignored.
The following example tests whether the web publication is currently set to be saved by using default encoding. If so, the AlwaysSaveInDefaultEncoding property is set to False, and the Encoding property is used to set the encoding to Unicode (UTF-8).
Dim theWO As WebOptions Set theWO = Application.WebOptions With theWO If .AlwaysSaveInDefaultEncoding = True Then .AlwaysSaveInDefaultEncoding = False .Encoding = msoEncodingUTF8 End If End With
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.