CTextDocument2.Openmethod
Opens a specified document. There are parameters to specify access and sharing privileges, creation and conversion of the file, as well as the code page for the file.
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.
Syntax
FUNCTION Open (BYVAL pVar AS VARIANT PTR, BYVAL Flags AS LONG = 0, BYVAL CodePage AS LONG = 0) AS HRESULT
Parameters
| Name | Description | |
|---|---|---|
pVar | A VARIANT that specifies the name of the file to open. | |
Flags | tomRTF: Open as RTF. tomText: Open as text ANSI or Unicode. | |
CodePage | The code page to use for the file. Zero (the default value) means CP_ACP (ANSI code page) unless the file begins with a Unicode BOM 0xfeff, in which case the file is considered to be Unicode. Note that code page 1200 is Unicode, CP_UTF8 is UTF-8. |
Return value
The return value can be an HRESULT value that corresponds to a system error or COM error code, including one of the following values.
Description
Opens a specified document. There are parameters to specify access and sharing privileges, creation and conversion of the file, as well as the code page for the file.
Reference
- Documented in Windows/WIndows Controls/RichEdit/CTextDocument2 Class.md
- Topic: CTextDocument2 Class