• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
多莱特~梦未醒,再出发

行路难,行路难,多歧路,今安在。

长风破浪会有时,直挂云帆济沧海。

博客园    首页    新随笔       管理     

Vsto开发记录

呵呵,原来开发插件的记录

Vsto bring the office application to .net programming .

Custom ribbon .

Custom task panes

Vsto == visual studio tool for office

支持2中级别

l Document level solution

Document-level customizations are the VSTO version of VBA macros in Word or Excel

l Application level solution

n ?难道说编写这种add –in 时,可以把数据统一保存到office的目录?也许根本不需要其他通信服务了?

Vsto 的好处

l VSTO provides data-caching capabilities as well as a ServerDocument class in C# that can be used by an application external to Offce

l Smart tags:recognize certain types of data in a document

l Ribbon

image image image

The development environment using Visual Studio 2008 is capable of creating application-level, data-centric solutions with VSTO 3.0. The data-centric solutions are the functionalities that are siginifcantly focused on data manipulation and data storage.

二.Object & Document

1.Actions Pane

Action Panes provide a convenient way for developers to introduce custom UIs into Offce applications

The Custom Actions Pane is very different from the Custom Task Pane, even though they sound very similar. The Custom Task Pane is associated with application-level solutions, and the Custom Actions Pane is associated with document-level solutions

注意区分应用程序级别和文档级别的,以及对应模块的区别,action pane应用于文档级别。

Task Panel ,Ribbon 应用于应用程序级别。

The Task Pane design also includes the three main design options:

l Design templates that include HTML layouts for Task Pane

l Color schemes that provide a way of creating a rich look and feel for Task Panes

l Animation schemes that let you do things such as adding animated fles through the Windows Form control or through HTML elements

Word Host Items

Host item

Host Control:VSTO 3.0 extends data binding to Offce solutions by enabling programmers to bind data to objects such as bookmarks, ranges, and so on. These objects are called host controls;

WdBuiltInProperty

Document.BuildInDocumentProperty

wdPropertyAppName

Name of application.

wdPropertyAuthor

Author.

wdPropertyBytes

Byte count.

wdPropertyCategory

Category.

wdPropertyCharacters

Character count.

wdPropertyCharsWSpaces

Character count with spaces.

wdPropertyComments

Comments.

wdPropertyCompany

Company.

wdPropertyFormat

Not supported.

wdPropertyHiddenSlides

Not supported.

wdPropertyHyperlinkBase

Not supported.

wdPropertyKeywords

Keywords.

wdPropertyLastAuthor

Last author.

wdPropertyLines

Line count.

wdPropertyManager

Manager.

wdPropertyMMClips

Not supported.

wdPropertyNotes

Notes.

wdPropertyPages

Page count.

wdPropertyParas

Paragraph count.

wdPropertyRevision

Revision number.

wdPropertySecurity

Security setting.

wdPropertySlides

Not supported.

wdPropertySubject

Subject.

wdPropertyTemplate

Template name.

wdPropertyTimeCreated

Time created.

wdPropertyTimeLastPrinted

Time last printed.

wdPropertyTimeLastSaved

Time last saved.

wdPropertyTitle

Title.

wdPropertyVBATotalEdit

Number of edits to VBA project.

wdPropertyWords

Word count.

Document currentDoucment = Globals.ThisAddIn.Application.ActiveDocument;

Microsoft.Office.Core.DocumentProperties docuemntProperty = (Microsoft.Office.Core.DocumentProperties) (currentDoucment.BuiltInDocumentProperties);

docuemntProperty[WdBuiltInProperty.wdPropertyKeywords].Value = (object)Guid.NewGuid().ToString();

currentDoucment.Save();

Cached Data in Data Island

使用[Cache]可以把文档中的数据,缓存到document当中的xml中。

posted @ 2010-06-09 14:55  Young跑跑  阅读(655)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3