Determine the Document Format
To determine a document format
-
Open the document. See Open and View a Document.
To get format information without viewing the document, set the
VAPIDF_FLAGS_OPEN_VAPI_ONLYflag in thenFlagsmember of theTPVAPIOpenDocumentInfostructure.To quickly determine a document's format, regardless of whether the document is supported for viewing, set the
VAPIDF_FLAGS_OPEN_FORMAT_ONLYflag in thenFlagsmember of theTPVAPIOpenDocumentInfostructure. Only theVAPIM_INITmessage with theVAPIMWP_INIT_GETDOCFORMATparameter is supported when opening a document with theVAPIDF_OPEN_FORMAT_ONLYflag enabled. -
Use the VAPIMWP_INIT_GETDOCFORMAT parameter of the
VAPIM_INITmessage to get the document format of the currently opened document. -
Use the VAPIMWP_INIT_GETDOCCLASS parameter of the
VAPIM_INITmessage to get the general class to which the currently opened document belongs.