• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            S.l.e!ep.¢%

            像打了激速一樣,以四倍的速度運(yùn)轉(zhuǎn),開心的工作
            簡單、開放、平等的公司文化;尊重個(gè)性、自由與個(gè)人價(jià)值;
            posts - 1098, comments - 335, trackbacks - 0, articles - 1
              C++博客 :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理
            看到的是這篇文章
            http://www.vckbase.com/document/viewdoc/?id=1186
            ? 調(diào)用word
            http://www.vckbase.com/document/viewdoc/?id=648??? office 插件開發(fā)
            http://tech.163.com/05/0201/10/1BGGKDV90009159Q.html?ATL開發(fā) office插件

            Create an automation project

            1. With Microsoft Developer Studio, start a new "MFC AppWizard (exe)" project named "AutoProject."
            2. In step 1 of the MFC AppWizard, choose "Dialog Based" for the application type and then click Finish.
            3. Click ClassWizard on the View menu (or press CTRL+W).
            4. Select the Automation tab. Click Add Class and choose "From a type library." Navigate to select the object library for the application you wish to automate (for this example, if you are automating Excel 97, choose the Microsoft Excel 8.0 Object Library; the default location is C:\Program Files\Microsoft Office\Office\Excel8.olb).
              Excel 2003. XL5EN32.OLB
            5. NOTE: The list box in the Confirm Classes dialog box contains all of the IDispatch interfaces (which are virtually identical to classes) in the Microsoft Excel type library. In the lower half of the dialog box you will see that an Implementation file named Excel8.cpp contains generated class wrappers derived from ColeDispatchDriver(), and the appropriate declaration header file is named Excel8.h. (For Excel 2002 and Excel 2003, the files are named Excel.cpp and Excel.h.)
            6. Click OK to close the MFC ClassWizard dialog box.
          1. Add the following code to the CAutoProjectApp::InitInstance() function, which loads and enables the COM services library:
                  BOOL CAutoProjectApp::InitInstance()
                  {
                     if(!AfxOleInit())  // Your addition starts here
                     {
                        AfxMessageBox("Could not initialize COM dll");
                        return FALSE;
                     }                 // End of your addition
            
                     AfxEnableControlContainer();
                  .
                  .
                  .
            
                  }
            					
          2. Add the following line to the #include statements at the top of the AutoProject.cpp program file:
                  #include <afxdisp.h>
            					
          3. Add the include statement for excel8.h after the include statement for stdafx.h at the top of the AutoProjectDlg.cpp program file:
                  #include "stdafx.h"
                  #include "excel8.h" // excel.h in the case of Excel 2002 and Excel 2003.
            					
          4. Add automation code to the CAutoProjectDlg::OnRun() so that it appears as shown below:
                  void CAutoProjectDlg::OnRun()
                  {
                      _Application app;  // app is the Excel _Application object
            
                      // Start Excel and get Application object...
                     if(!app.CreateDispatch("Excel.Application"))
                     {
                        AfxMessageBox("Couldn't start Excel.");
                     }
                     else
                     {
                        //Make Excel Visible and display a message
                      app.SetVisible(TRUE);
                      AfxMessageBox ("Excel is Running!");
                     }
                  }
            					

            ?????????

          5. 大伊人青草狠狠久久| 香蕉久久夜色精品国产尤物| 久久久久久久97| 久久精品aⅴ无码中文字字幕不卡 久久精品aⅴ无码中文字字幕重口 | 亚洲国产成人精品久久久国产成人一区二区三区综 | 精品国产乱码久久久久久人妻| 久久一日本道色综合久久| 久久91综合国产91久久精品| 久久91精品国产91久| 2021国产成人精品久久| 久久天天躁狠狠躁夜夜不卡| 久久国产免费直播| 久久电影网2021| 精品国产乱码久久久久久1区2区| 久久精品二区| 久久99精品国产麻豆不卡| 亚洲av伊人久久综合密臀性色| 国产高潮久久免费观看| 天天久久狠狠色综合| 日产精品久久久久久久性色| 国产精品一区二区久久精品涩爱 | 久久精品中文无码资源站| 狠狠久久综合伊人不卡| 国产午夜久久影院| 国产精品久久久久久久久鸭| 久久精品国产亚洲av水果派| 欧美精品久久久久久久自慰| 日本五月天婷久久网站| 久久精品aⅴ无码中文字字幕不卡| 久久久精品久久久久久 | 91精品国产91热久久久久福利| 久久国产乱子精品免费女| 久久99精品国产一区二区三区| 无码国产69精品久久久久网站| 偷窥少妇久久久久久久久| 麻豆精品久久久久久久99蜜桃| 一本久道久久综合狠狠爱| 欧洲精品久久久av无码电影| 久久精品无码一区二区无码 | 人妻无码αv中文字幕久久琪琪布 人妻无码精品久久亚瑟影视 | 伊人久久大香线蕉综合Av|