Skip to content

Creating Embedded Documents

In DataFlex, you can create a new embedded document object using CreateComObject, or you can create a document based on an existing file using CreateComObjectFromFile.

When you use CreateComObject, a new in-memory compound document is created to store the embedded document. When you use CreateComObjectFromFile, a new in-memory compound document is created and initialized with the contents of the specified file. It is important to remember that with CreateComObjectFromFile, you are editing a copy of the document read from the file, not the actual file itself.

Any embedded document that your wrapper object may be referencing at the time of creating a new document is discarded without saving any changes.

See Also