DefaultWebOptions.Encoding property (Excel)
Returns or sets the document encoding (code page or character set) to be used by the web browser when you view the saved document. The default is the system code page. Read/write MsoEncoding.
Syntax
expression.Encoding
expression A variable that represents a DefaultWebOptions object.
Remarks
You cannot use any of the constants that have the suffix AutoDetect. These constants are used by the ReloadAs method.
Example
This example checks to see whether the default document encoding is Western, and then it sets the string strDocEncoding
accordingly.
If Application.DefaultWebOptions.Encoding = msoEncodingWestern Then
strDocEncoding = "Western"
Else
strDocEncoding = "Other"
End If
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.