DSOFramer 原有的接口说明 DSOFramer原有的接口说明 =================================================================== DSOFramer 原有的接口说明 1
void CreateNew(BSTR ProgIdOrTemplate) 新建文档, 其中: ProgIdOrTemplate 参数: Excel Spreadsheet "Excel
Sheet" Excel Chart "Excel
Chart" PowerPoint Presentation "owerPoint
Show" Project Project "MSProject
Project" Visio Drawing "Visio
Drawing" Word Document "Word
Document" 2
HRESULT Open([in] VARIANT Document, [in, optional] VARIANT ReadOnly, [in, optional] VARIANT ProgId, [in, optional] VARIANT WebUsername, [in, optional] VARIANT WebPassword) 打开文档,可以是本地文件或者是服务器文件 参数: Document 文档路径 ReadOnly 是否已只读模式打开 ProgId OLE 类型 WebUsername 用户名(访问网络的文件时候,有可能需要) WebPassword 密码 例子: DsoFramer1
Open "C:\TestBook
xls" DsoFramer1
Open "C:\Plain
txt", , "Word
Document" //用 Word 来打开c:\plain
txt 文件 Ds