AddIn加载项在word中的概念及使用
时间:2023-09-08 21:03:53
-
一、什么是AddIn加载项
AddIn对象是AddIns集合中的一个元素。
AddIns集合包含 Word 中所有的有效加载项,不论其当前是否已加载。
AddIns集合包含在“工具”菜单的“模板和加载项”对话框内所显示的共用模板或 Word 加载项库 (WLL) 中。
二、如何使用AddIn对象
要想使用AddIn对象,我们得在VBA环境下使用。如下为使用方法,希望对你有所帮助。
用AddIns(index) 可返回单个 AddIn对象,其中 index 是指加载项的名称或索引序号。名称的拼写必须与“模板和加载项”对话框内所显示的完全匹配(大小写不必匹配)。下面的示例将以共用模板形式加载 Letter.dot。
AddIns("Letter.dot").Installed = True索引序号代表加载项在“模板和加载项”对话框内的加载项列表中所处的位置。下列指令显示第一个有效加载项的路径。
If Addins.Count >= 1 Then MsgBox Addins(1).Path下列示例在活动文档开始处创建一个加载项列表。该列表包含了每一个有效加载项的名称、路径和加载状态。
With ActiveDocument.Range(Start:=0, End:=0)
.InsertAfter "Name" & vbTab & "Path" & vbTab & "Installed"
.InsertParagraphAfter
For Each oAddIn In AddIns
.InsertAfter oAddIn.Name & vbTab & oAddIn.Path & vbTab _
& oAddIn.Installed
.InsertParagraphAfter
Next oAddIn
.ConvertToTable
End With
用Add方法可在有效加载项列表中添加加载项,并可通过 Install参数(可选)将其加载。
AddIns.Add FileName:="C:TemplatesOtherLetter.dot", Install:=True用Installed属性,可加载有效加载项列表中的加载项。
AddIns("Letter.dot").Installed = True注意 用Compiled属性可判断 AddIn对象是模板还是一个 WLL。
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
微软将于10月26日召开发布会:Surface设备的盛宴
![](https://img.aspxhome.com/file/2023/4/a303183_0s.jpg)
Win10升级助手无法运行解决方法
![](https://img.aspxhome.com/file/2023/1/a279144_0s.png)
Excel如何更改默认货币格式
![](https://img.aspxhome.com/file/2023/0/37190_0s.png)
wps里条件格式在哪里_wps找不到条件格式教程
![](https://img.aspxhome.com/file/2023/30/a269586_0s.png)
win10投影仪常见问题汇总_win10投影仪常见问题的解决方法
![](https://img.aspxhome.com/file/2023/4/a313181_0s.png)
为什么Excel2010数据开头的0不显示
![](https://img.aspxhome.com/file/2023/8/43248_0s.jpg)
U盘意外被烧,如何找回数据?
![](https://img.aspxhome.com/file/2023/4/a304362_0s.jpg)
苹果Mac电脑如何实现自动开机?让苹果Mac电脑自动开机的设置方法
![](https://img.aspxhome.com/file/2023/0/a208800_0s.png)
如何启用新的“开始”菜单选项以关闭Windows 11上的建议?
![](https://img.aspxhome.com/file/2023/30/a264095_0s.jpg)
WPS文字设置怎么文本框透明度图文教程
网易mumu模拟器可以多开吗?网易mumu模拟器怎么多开?
![](https://img.aspxhome.com/file/2023/30/a264165_0s.jpg)
PPT中压缩图片大小的方法
win10更新到1903后电脑音质变差怎么办?
![](https://img.aspxhome.com/file/2023/28/a240776_0s.jpg )
win10系统蓝屏解决方法_win10系统蓝屏如何解决?
![](https://img.aspxhome.com/file/2023/8/48498_0s.jpg)
打印机无法识别usb设备怎么解决 打印机usb连接电脑无法识别解决办
![](https://img.aspxhome.com/file/2023/30/a269403_0s.jpg)
在excel中用自定义函数获取合并单元格内的行数
用wps怎么写论文?
如何利用Premiere消除视频中的声音?
Win8系统如何设置允许程序通过防火墙
![](https://img.aspxhome.com/file/2023/29/a257054_0s.jpg)
Foxmail邮箱导出联系人图文教程 Foxmail联系人怎么导出
![](https://img.aspxhome.com/file/2023/8/a338454_0s.jpg)