http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoffdev/html/vsofficedev.asp
how do i automate a microsoft office application from visual c++? 【程序编程相关:MFC的子类化技术】
visual c++/mfc—frequently asked questions 【推荐阅读:实用!超强VC/MFC 常见问答收集】how do i attach to the running instance of an office application? 【扩展信息:进程管理器---一个SDK的例子】
there are several ways you can control office applications through automation using visual c++: use mfc and the visual c++ classwizard to generate "wrapper classes" from the microsoft office type libraries. use "smart pointers" created with the #import directive from an office type library. use c/c++ to make direct calls to com services without the overhead of mfc or #import.
for more details, see info: using visual c++ to automate office (q238972).
to automate an office application that is already running, you can use the getactiveobject() api function to obtain the idispatch pointer. once you have the idispatch pointer for the running instance, you can then call its methods and properties. for additional information, see howto: attach to a running instance of an office application (q238975).
how do i pass optional parameters to methods and properties?
... 下一页