關于我們
書單推薦
新書推薦
|
VSTO開發(fā)入門教程
本書從初學者角度出發(fā),詳細介紹了使用C#語言進行VSTO開發(fā)需要掌握的知識。全書分為12章,
內(nèi)容包括VSTO入門概述、C#語法基礎、C#進階技術、C#操作Excel對象、創(chuàng)建Office外接程序、自定義
Office功能區(qū)、自定義任務窗格、自定義工具欄,VSTO外接程序的部署分發(fā)、VSTO開發(fā)Office文檔、
VSTO開發(fā)資源大全、C#與VB/VBA語言的差異對比。書中所有章節(jié)涉及的程序代碼都給出了詳細的注
釋。本書可以讓讀者輕松熟悉Visual Studio開發(fā)環(huán)境,跨入C#編程的門檻,掌握VSTO開發(fā)的步驟。
本書可作為職場辦公人員、高校理工科師生、Office專業(yè)開發(fā)人員自學用書,也可以作為Office編
程培訓講師的教學參考書。
? 資深軟件開發(fā)專家撰寫,系統(tǒng)且深入闡釋VSTO開發(fā)涉及的工具、方法和實踐? 由淺入深剖析VSTO開發(fā)過程中遇到的各個層面的問題,涉及Visual Studio、C#開發(fā)、創(chuàng)建Office外接程序、自定義Office功能區(qū)、任務窗格、自定義工具欄等
VSTO是指Visual Studio Tools for Offi ce,其含義是在Visual Studio開發(fā)環(huán)境中進行Offi ce專業(yè)開發(fā)。Visual Studio是目前最流行的Windows平臺應用程序的集成開發(fā)環(huán)境。VSTO是VBA的替代,使得開發(fā)Office應用程序更加簡單,并且用VSTO來開發(fā)Office應用程序可以使用Visual Studio開發(fā)環(huán)境中的眾多功能。VSTO是一套用于創(chuàng)建自定義Office應用程序的Visual Studio工具包,可以用Visual Basic或者Visual C#擴展Office應用程序(例如Word、Excel、PowerPoint和Outlook)。正是由于VSTO具有諸多優(yōu)勢,吸引了越來越多的人開始轉入研究VSTO開發(fā),但是到目前為止,國內(nèi)還沒有一本比較適合初學者的入門教材,網(wǎng)絡上查到的相關知識點也比較片面。本書是國內(nèi)第一部關于VSTO開發(fā)Office的經(jīng)典書籍,作者根據(jù)自己的開發(fā)經(jīng)驗,將開發(fā)過程中的關鍵技術和要點都融入本書。全書共12章,作者從讀者的角度考慮,編排了從Visual Studio的安裝、C#語言入門,一直到創(chuàng)建第一個完整的VSTO項目,基本是手把手地告訴讀者每一個環(huán)節(jié)。讀者閱讀本書后,可以自行開發(fā)完整的VSTO項目,并制作成可以分發(fā)的安裝包。最重要的是,通過本入門教程的學習,能讓讀者增強信心,產(chǎn)生進一步深入研究和探索VSTO的興趣。也許很多讀者朋友看到諸如Visual Studio、C#這樣的字眼望而生畏,其實VSTO并沒有想象的那么難,只要按照本教程按部就班學習,結合視頻教程的講解,很快就能掌握這項開發(fā)技術。VSTO學習路線圖對于VSTO的初學者,可以按照如下的路線圖進行系統(tǒng)學習。如果是已經(jīng)具有Visual Studio和C#基礎的讀者,則可以直接從第三階段學起。
VSTO 開發(fā)入門教程第一階段:熟悉Visual Studio編程環(huán)境? 理解VSTO的概念? 安裝Visual Studio? 熟悉解決方案和項目文件夾第二階段:熟悉C#語言? 創(chuàng)建C#窗體應用程序、窗體與常用控件的使用? C#語法基礎(變量、控制語句、不同數(shù)據(jù)類型的轉換等)? 程序代碼調(diào)試、錯誤處理? 使用類第三階段:C#操作和控制Excel對象? 熟悉Excel對象模型,Excel對象的常用屬性、方法和事件? 加強從VBA代碼向C#代碼遷移的能力第四階段:界面設計部分? 定制功能區(qū):使用功能區(qū)設計器或使用XML代碼,理解Custom UI機制? 任務窗格:任務窗格中控件和用戶控件的添加? 創(chuàng)建文檔自定義項,使用文檔操作窗格? 自定義工具欄第五階段:VSTO項目分發(fā)與安裝程序的制作? 使用Advanced Installer其他知識點? 使用C#制作Excel自定義函數(shù)(UDF)? 創(chuàng)建Word、PPT等組件的VSTO項目VSTO課程學習路線圖本書內(nèi)容本書內(nèi)容以VSTO學習路線圖為依據(jù)編排而成,全書共分12章。第1章:VSTO入門概述本書介紹的是一項程序開發(fā)技術,因此首先要讓讀者安裝必要的程序語言和開發(fā)環(huán)境。然后講述VSTO開發(fā)的意義和任務,以及創(chuàng)建和調(diào)試C#解決方案的方法與步驟。第2章:C#語法基礎 III本書以C#為開發(fā)語言,因此讀者需要掌握一定程度的C#語法基礎。該章介紹了變量的聲明和賦值、流程控制與類的使用。第3章:C#進階技術該章講述了C#窗體與控件的相關技術,以及像正則表達式、字典等高級對象的用法,目的是讓讀者在開發(fā)過程中,能夠熟練應用這些高級對象去處理實際問題。第4章:C#操作Excel對象前面3章講述的是純粹的C#語言,而從這一章開始,講述如何使用C#操作和控制Office對象,該章以Excel為例,介紹了Excel的應用程序、工作簿、工作表、單元格區(qū)域等對象的成員。第5章:創(chuàng)建Office外接程序VSTO開發(fā)的目的旨在創(chuàng)建Office外接程序(即COM加載項)。該章介紹了COM加載項的工作原理和開發(fā)基本步驟。第6章:自定義Office功能區(qū),第7章:自定義任務窗格第6章和第7章分別介紹了VSTO開發(fā)的重點,一般來說,創(chuàng)建一個Office外接程序,界面定制是非常必要的,為此本書在這兩章里詳盡地介紹了功能區(qū)的自定義技術和自定義窗格的設計方法。第8章:自定義工具欄Office工具欄是Office組件中很重要的一個界面對象,為此本書通過典型的實例,講述了工具欄和控件的自定義方法。第9章:VSTO外接程序的部署分發(fā)VSTO開發(fā)的成品,一般需要能夠在其他計算機上正常使用,為此,該章介紹了使用Advanced Installer軟件來創(chuàng)建VSTO項目的安裝程序。第10章:VSTO開發(fā)Office文檔文檔自定義開發(fā)是VSTO另一類型的項目。該項目允許自定義文檔,可以向文檔中加入C#控件,以及創(chuàng)建和控制文檔窗格。第11章:VSTO開發(fā)資源大全工欲善其事,必先利其器,為了能夠駕輕就熟地進行VSTO開發(fā),還需要使用其他一些工具的輔助,為此,該章介紹了典型工具的安裝和使用技巧。第12章:C#與VB/VBA語言的差異對比考慮到很多讀者是從VBA轉過來的,對VBA的語法和對象模型更為熟悉,為了能夠幫助讀者更快地從VBA轉入VSTO,該章列出了兩種語言典型的語法差異。 VSTO 開發(fā)入門教程本書特點本書是目前市面上稀缺而Office開發(fā)人員急需的、Office和C#技巧完美融合的經(jīng)典書籍,為了讓讀者快速了解和熟悉VSTO,本書第2~4章的C#代碼都配備了對應的VBA代碼,可以讓之前從事VBA開發(fā)的讀者迅速學會VSTO開發(fā)。同時本書配套資源中包括本書涉及的所有項目的源文件,以便讀者加以驗證和核對。另外,本書配套資源中還有與VSTO開發(fā)相關的全部有聲視頻教程。本書配套資源內(nèi)容說明本書配套資源包括VSTO開發(fā)入門視頻教程、本書所有示例程序、VSTO開發(fā)資源大全三大部分內(nèi)容。關于本書配套資源,讀者可訪問http://vba.mahoupao.net/forum.php?mod=viewthread&tid=2407&fromuid=1進行下載。大分類文件名對應章節(jié)或描述VSTO開發(fā)入門視頻教程VSTO概述.wmv 第1章C#語法基礎.wmv 第2章類的創(chuàng)建和使用.wmv 2.12節(jié)窗體和控件的設計技術.wmv 3.7節(jié)C#操作Excel對象.wmv 第4章創(chuàng)建Office外接程序.wmv 第5章使用Ribbon設計器自定義Office功能區(qū).wmv 6.4節(jié)使用XML自定義Office功能區(qū).wmv 6.5節(jié)自定義任務窗格的設計.wmv 第7章VSTO外接程序的打包.wmv 第9章VSTO開發(fā)Office文檔-文檔操作窗格.wmv 第10章示例程序ConsoleApplication20160629 1.2.1節(jié)ExcelAddIn20160514 6.4節(jié)ExcelAddIn20160515 6.5節(jié)ExcelAddIn20160516 7.2節(jié)ExcelAddIn20160517 8.2.1節(jié)ExcelWorkbook20160519 10.3節(jié)Solution20160705 1.4節(jié)UDF20160521 4.9.1節(jié)VSTOBOOK-C# 第2章VSTOBOOK-VB 第2章WindowsFormsApplication20160522 4.2節(jié)WindowsFormsApplication20160523 3.4節(jié) 大分類文件名對應章節(jié)或描述示例程序WindowsFormsApplication20160524 3.5.4節(jié)WindowsFormsApplication20160525 3.6節(jié)WindowsFormsApplication20160526 3.7節(jié)WindowsFormsApplication20160527 3.7.9節(jié)WindowsFormsApplication20160528 3.8節(jié)WindowsFormsApplication20160606 2.2節(jié)WindowsFormsApplication20160625 2.12節(jié)WindowsFormsApplication20160629 1.2.2節(jié)VSTO開發(fā)資源大全OfficeCommandbarDesigner20160709.rar11.1節(jié)OfficeCommandbarViewer20160709.rarFaceIDs_V2_20160709.xlsFaceIDs_V2_20160709.docOffice2010ControlIDs.rar11.2節(jié)imageMso7345.xlsmOfficeCustomUIEditorSetup.msiRibbonXMLEditor20160709.rarribbon回調(diào)函數(shù)大全.xlsmUseAPI.rar 3.8節(jié)VBE2014_Setup_2016070911.3節(jié)VisualStudioAddin2016Setup.exe讀者對象● 職場辦公人員● 理工科類大學生、研究生● 編程愛好者● 培訓機構的老師和學員本書約定書中述及的多級菜單和工具欄的圖示中,鼠標單擊的各級菜單或命令均放在中文方括號之中,各級之間以斜杠隔開。例如【文件/打開】表示連續(xù)單擊了文件菜單的打續(xù)表VSTO 開發(fā)入門教程開子菜單。書中所有的VBA和C#代碼段,代碼左側均有行號,這些行號只是為了便于講解,并不屬于代碼部分。讀者服務為了方便本書內(nèi)容答疑,讀者朋友可加入VBA/VSTO開發(fā)QQ群:61840693,也可以在VBA/VSTO論壇(http://vba.mahoupao.net/forum.php)發(fā)帖,還可以直接給作者發(fā)Email:lyflyf715@sina.com。無論哪一種方式,作者將竭誠為您服務。如果要進一步學習Office、VBA、VSTO等學科的視頻課程,讀者可在51CTO學院搜索作者主講的相關課程:http://edu.51cto.com/user/user_id-6673733.html。致謝感謝劉愛珍、儒道佛潘淳、西西老師、張杰、聞啟學等朋友以及兄長劉永和在本書編寫過程中給予的無私幫助和鼓勵。本書在出版過程中,得到了清華大學出版社策劃編輯秦健先生的大力支持和配合,在此表示衷心感謝。另外,本書所有的編審、發(fā)行人員為本書的出版和發(fā)行付出了辛勤勞動,在此一并致謝。特別說明本書編寫時所用的VSTO開發(fā)環(huán)境如下:● 操作系統(tǒng):Windows 7(32bit)● Office:Office 2010完整版● Visual Studio:Visual Studio 2012● 開發(fā)語言:C#讀者可以根據(jù)自身條件適當調(diào)整。另外,本書涉及的所有VSTO示例,均以Excel 2010為開發(fā)對象,對于其他Office組件的開發(fā),過程非常類似,讀者可以在Excel開發(fā)的基礎上自行探索。致讀者微軟Office套件稱得上是全世界最成功的辦公軟件,擁有非常多的用戶。它之所以受到人們的青睞,有多方面的原因,但是以下幾點是有目共睹的:一是功能完善而且強大;二是容易操作,用戶容易學會;三是具有強大的編程開發(fā)功能。 VII隨著計算機的發(fā)展,以往的手工操作辦公軟件已經(jīng)不能滿足現(xiàn)代辦公的需要,因此,VBA以及VSTO開發(fā)和應用技術應運而生。本書在編寫過程中,受到了眾多Office開發(fā)人員的關注,他們殷切希望本書盡早出版。除了劉永富之外,參與本書編寫的人員還有章曉琳、馬成林、鐘卓成、李四桂、何明、段留柱、高大偉、肖云、譚信章、戴海東、朱輝、徐鵬、祝磊、管洪洋、劉愛珍、王繼成、汪龍、林興龍、梁加成等。在編寫過程中難免會有漏洞,歡迎讀者通過清華大學出版社網(wǎng)站(www.tup.com.cn)與我們聯(lián)系,幫助我們改正提高。劉永富2016年7月于北京 第1章 VSTO入門概述 ················1 1.1 VSTO簡述 ·································· 1 1.1.1 VSTO的功能與特點 ······················· 1 1.1.2 VSTO開發(fā)語言 ····························· 2 1.1.3 VSTO開發(fā)環(huán)境配置 ······················· 3 1.1.4 Visual Studio開發(fā)環(huán)境 ····················· 4 1.1.5 Visual Studio版本沿革 ····················· 4 1.1.6 Visual Studio的安裝 ························ 4 1.2 創(chuàng)建第一個C#應用程序 ················· 5 1.2.1 控制臺應用程序 ···························· 5 1.2.2 Windows窗體應用程序 ··················· 9 1.2.3 生成可執(zhí)行文件 ···························11 1.3 認識Visual Studio開發(fā)環(huán)境·············11 1.3.1 【文件】菜單 ······························12 1.3.2 【視圖】菜單 ······························12 1.3.3 【項目】菜單 ······························12 1.3.4 菜單欄和工具欄的自定義 ···············13 1.3.5 Visual Studio選項 ··························14 1.4 Visual Studio項目組織結構 ·············14 1.4.1 解決方案 ····································14 1.4.2 項目 ··········································17 1.4.3 類模塊 ·······································18 1.4.4 引用管理 ····································18 1.5 使用幫助系統(tǒng) ·····························19 1.5.1 設置幫助查看方式 ························19 1.5.2 下載和安裝Help Viewer ··················19 1.5.3 管理幫助內(nèi)容 ······························19 本章要點回顧····································21 第2章 C#語法基礎 ··················· 22 2.1 變量的聲明和賦值 ······················22 2.1.1 常用的數(shù)據(jù)類型 ···························22 2.1.2 賦值運算符 ·································23 2.1.3 變量的作用范圍 ···························23 2.2 字符與字符串處理 ·······················24 2.2.1 字符變量 ····································24 2.2.2 字符串變量 ·································25 2.2.3 轉義字符 ····································26 2.2.4 字符串連接 ·································27 2.2.5 子字符串 ····································27 2.2.6 格式化字符串 ······························28 2.2.7 字符串的替換 ······························28 2.2.8 字符串與數(shù)組 ······························28 2.3 邏輯運算 ···································29 2.3.1 布爾型變量 ·································29 2.3.2 比較運算符 ·································30 2.3.3 多條件的與或非運算 ·····················30 2.4 不同類型的強制轉換 ····················31 2.4.1 ToString ·····································31 2.4.2 Parse ·········································31 2.4.3 Convert ······································32 2.5 使用數(shù)組 ···································33 2.5.1 數(shù)組的聲明和初始化 ·····················33 2.5.2 一維數(shù)組 ····································33 2.5.3 數(shù)組元素的遍歷 ···························34 2.5.4 二維數(shù)組 ····································35 2.6 條件選擇語句 ·····························37 2.6.1 三元運算符 ·································37 2.6.2 if語句 ········································38 2.6.3 switch語句 ··································39 2.7 循環(huán)語句 ···································40 2.7.1 while循環(huán) ···································40 2.7.2 do循環(huán) ·······································41 2.7.3 for循環(huán) ······································42 2.7.4 foreach循環(huán)·································43 2.8 流程控制語句 ·····························43 2.8.1 break語句 ···································43 2.8.2 continue語句 ·······························44 2.8.3 goto語句 ····································44 2.8.4 return語句 ···································45 2.9 輸出對話框(MessageBox) ··········46 2.9.1 MessageBox語法 ··························46 2.9.2 自定義對話框的按鈕 ·····················47 2.9.3 自定義對話框的圖標 ·····················48 2.9.4 自定義對話框默認按鈕 ··················48 2.9.5 處理對話框的用戶響應 ··················48 2.10 輸入對話框(InputBox) ·············49 2.11 過程與函數(shù) ······························50 2.11.1 過程與函數(shù)的定義 ······················50 2.11.2 過程與函數(shù)的調(diào)用 ······················51 2.12 類的創(chuàng)建和使用 ························52 2.12.1 非靜態(tài)類 ··································52 2.12.2 靜態(tài)類 ·····································54 2.13 using指令 ·································55 2.14 錯誤處理 ·································55 本章要點回顧····································56 第3章 C#進階技術 ···················57 3.1 文件與文件夾操作 ·······················57 3.1.1 System.IO命名空間 ·······················57 3.1.2 文件與文件夾處理實例 ··················58 3.2 文本文件的讀寫 ··························59 3.3 數(shù)據(jù)庫操作 ································60 3.4 使用資源文件 ·····························61 3.4.1 添加資源文件 ······························62 3.4.2 資源文件中的字符串 ·····················62 3.4.3 資源文件中的圖像 ························63 3.5 使用正則表達式 ··························65 3.5.1 創(chuàng)建Regex對象 ····························65 3.5.2 元字符 ·······································65 3.5.3 正則表達式選項 ···························66 3.5.4 正則表達式方法 ···························67 3.5.5 正則表達式測試器 ························71 3.6 使用字典 ···································72 3.6.1 字典對象的創(chuàng)建 ···························72 3.6.2 根據(jù)鍵檢索值 ······························73 3.6.3 遍歷所有鍵名 ······························74 3.6.4 遍歷所有值 ·································74 3.6.5 去除重復 ····································74 3.7 窗體設計技術 ·····························76 3.7.1 窗體的顯示 ·································76 3.7.2 窗體的卸載 ·································77 3.7.3 窗體與控件的事件 ························78 3.7.4 使用窗體菜單 ······························82 3.7.5 使用工具欄 ·································85 3.7.6 使用右鍵菜單 ······························87 3.7.7 使用狀態(tài)欄 ·································88 3.7.8 使用文件選擇對話框 ·····················90 3.7.9 運行期間動態(tài)增刪控件 ··················91 3.8 使用Windows API 函數(shù) ··················94 3.8.1 窗口類名和句柄 ···························95 3.8.2 使用Spy ··································98 3.8.3 使用UseAPI ······························ 100 3.8.4 獲取光標位置 ···························· 101 本章要點回顧·································· 101 第4章 C#操作Excel對象·········· 102 4.1 Excel對象模型概述 ···················· 102 4.1.1 Application對象 ·························· 103 4.1.2 Workbook 對象 ··························· 104 4.1.3 Worksheet 對象 ··························· 104 4.1.4 Range對象 ································ 105 4.1.5 Window 對象 ······························ 105 4.2 創(chuàng)建可以訪問Excel對象的C#窗體 應用程序 ································· 105 4.2.1 添加Excel 2010對象引用 ·············· 105 4.2.2 添加Office 2010對象引用 ·············· 105 4.3 操作Application對象 ··················· 107 4.3.1 獲取正在運行的Excel對象 ············ 107 4.3.2 創(chuàng)建新的Excel對象 ····················· 109 4.3.3 Application對象常用屬性 ·············· 109 4.3.4 Application對象常用方法 ·············· 110 4.3.5 Application對象常用事件 ·············· 110 4.3.6 Application重要集合對象 ·············· 111 4.4 操作Workbook 對象···················· 112 4.4.1 Workbook 對象常用屬性··············· 112 4.4.2 Workbook 對象常用方法··············· 113 4.4.3 Workbook 對象常用事件··············· 114 4.4.4 Workbook 重要集合對象··············· 114 4.5 操作Worksheet 對象 ···················· 115 4.5.1 Worksheet 對象常用屬性 ··············· 115 4.5.2 Worksheet 對象常用方法 ··············· 116 4.5.3 Worksheet 對象常用事件 ··············· 117 4.6 操作Range對象 ························· 117 4.6.1 Range對象常用屬性···················· 117 4.6.2 Range對象常用方法···················· 118 4.6.3 Range對象的遍歷 ······················· 119 4.6.4 二維數(shù)組與Range數(shù)據(jù)交換··········· 120 4.6.5 一維數(shù)組與Range數(shù)據(jù)交換··········· 121 4.7 操作Commandbar對象 ················ 121 4.8 操作VBE工程 ·························· 123 4.8.1 引用VBIDE類型庫 ······················ 123 4.8.2 允許對VBA工程訪問 ·················· 123 4.8.3 操作VBE各級對象 ······················ 125 4.9 創(chuàng)建Excel自定義函數(shù) ················· 125 4.9.1 使用C#創(chuàng)建類庫 ························ 126 4.9.2 工作表中使用C#開發(fā)的自定義 公式 ········································ 129 4.9.3 VBA中調(diào)用C#開發(fā)的自定義公式 ··· 131 4.9.4 C#中調(diào)用C#開發(fā)的自定義公式 ······ 131 4.9.5 客戶機使用C#制作的自定義函數(shù) ·······132 本章要點回顧·································· 133 第5章創(chuàng)建Office外接程序······· 134 5.1 Office COM加載項簡介 ··············· 134 5.2 認識Office COM加載項管理 對話框 ···································· 134 5.3 創(chuàng)建第一個Office外接程序項目 ····135 5.4 ThisAddin的啟動事件和卸載事件 ··136 本章要點回顧··································137 第6章 自定義Office功能區(qū) ·······138 6.1 CustomUI概述 ··························138 6.1.1 CustomUI的意義 ························140 6.1.2 CustomUI的作用范圍 ··················140 6.1.3 手工定制Office界面 ····················140 6.2 CustomUI與XML ·······················141 6.2.1 XML語法規(guī)則 ···························141 6.2.2 描述Office界面的XML ·················142 6.2.3 使用Ribbon XML Editor ···············148 6.3 CustomUI元素詳解 ····················149 6.3.1 選項卡(tab)元素 ·····················150 6.3.2 組(group)元素 ························151 6.3.3 控件(control)元素 ···················151 6.4 VSTO中使用功能區(qū)可視化 設計器 ····································154 6.4.1 為按鈕指定回調(diào)過程 ···················156 6.4.2 Group中加入DialogBoxLauncher ·····157 6.5 使用XML進行CustomUI定制 ········159 本章要點回顧··································162 第7章 自定義任務窗格 ············163 7.1 任務窗格行為控制 ·····················163 7.2 VSTO外接程序項目中添加任務 窗格 ·······································164 7.2.1 創(chuàng)建Excel 2010外接程序 ··············165 7.2.2 添加用戶控件 ····························165 7.2.3 靜態(tài)類中聲明任務窗格對象 ··········166 7.2.4 創(chuàng)建并顯示任務窗格 ···················167 7.3 功能區(qū)與任務窗格的交互控制 ······169 7.3.1 利用功能區(qū)切換按鈕控制任務窗格的 顯示隱藏 ··································169 7.3.2 處理自定義任務窗格事件 ·············172 7.3.3 完全卸載任務窗格 ······················173 本章要點回顧··································173 第8章 自定義工具欄 ···············174 8.1 Office工具欄對象簡述 ················174 8.1.1 Commandbar對象 ·······················174 8.1.2 CommandbarControl對象 ··············175 8.1.3 自定義工具欄的作用和意義 ··········176 8.2 VSTO實現(xiàn)自定義工具欄 ·············176 8.2.1 創(chuàng)建自定義工具欄 ······················176 8.2.2 處理工具欄按鈕的回調(diào) ················178 8.2.3 修改右鍵菜單 ····························179 8.2.4 卸載外接程序時清除自定義 ··········180 本章要點回顧··································181 第9章 VSTO外接程序的部署分發(fā) ···182 9.1 客戶機搭建VSTO運行環(huán)境 ··········182 9.2 VSTO外接程序的簡單安裝 ··········183 9.3 使用Advanced Installer ················184 9.3.1 創(chuàng)建aip安裝包工程 ·····················184 9.3.2 客戶機運行安裝包 ······················193 本章要點回顧··································194 第10章 VSTO開發(fā)Office文檔 ···195 10.1 文檔自定義項編程概述 ·············195 10.2 文檔自定義項允許添加的界面 元素 ·····································195 10.3 創(chuàng)建Office文檔項目 ··················196 10.3.1 文檔上添加C#控件 ····················198 10.3.2 文檔項目的啟動事件過程 ···········198 10.4 文檔操作窗格概述 ···················199 10.5 文檔操作窗格綜合實例 ·············200 10.5.1 添加用戶控件到文檔窗格 ···········202 10.5.2 添加多個相同控件到文檔窗格 ·····204 10.5.3 使用代碼創(chuàng)建窗體控件并添加到 文檔操作窗格 ··························205 10.5.4 定制功能區(qū)按鈕控制文檔操作 窗格 ······································206 10.6 文檔自定義項的部署分發(fā) ··········210 本章要點回顧··································211 第11章 VSTO開發(fā)資源大全 ·····212 11.1 Office 2003以下版本工具欄和控件的 自定義 ··································212 11.1.1 OfficeCommandbarDesigner ··········212 11.1.2 OfficeCommandbarViewer ············213 11.1.3 FaceIDViewer ···························213 11.2 Office 2007以上版本功能區(qū)的 自定義 ··································215 11.2.1 Office2010ControlIDs ·················215 11.2.2 imageMso7345 ··························216 11.2.3 OfficeCustomUIEditor ·················217 11.2.4 Ribbon XML Editor ····················217 11.2.5 Ribbon回調(diào)函數(shù)大全 ··················217 11.3 編程環(huán)境輔助工具 ···················218 11.3.1 VBE2014 ································219 11.3.2 VisualStudioAddin2016 ···············220 第12章 C#與VB/VBA語言的差異 對比··························222 12.1 變量必須聲明 ·························222 12.2 嚴格的類型匹配 ······················222 12.3 項目的自動保存 ······················222 12.4 嚴格區(qū)分大小寫 ······················223 12.5 語句結束必須加分號 ················223 12.6 語句塊 ··································223 12.7 調(diào)用其他函數(shù)圓括號不能少 ·······224 12.8 數(shù)組的下標為0 ························224 12.9 數(shù)組或集合對象的索引使用 方括號 ··································225
你還可能感興趣
我要評論
|