The concept and use of AddIn add-ins in Word

Source: Internet
Author: User
Tags valid

-

One, what is the AddIn add-ins

The AddIn object is an element in the AddIns collection.

The AddIns collection contains all valid add-ins in Word, regardless of whether they are currently loaded.

The AddIns collection is contained in the common template or Word add-in Library (WLL) that is displayed in the templates and Add-Ins dialog box on the Tools menu.

Ii. How to use the AddIn object

To use the AddIn object, we have to use it in a VBA environment. The following is the use of the method, I hope to help you.

Use AddIns (index) to return a single AddIn object, where index refers to the name or index number of the add-in. The spelling of the name must exactly match the display in the templates and Add-Ins dialog box (the case does not have to match). The following example loads the Letter.dot in the form of a common template.

AddIns ("Letter.dot"). Installed = True The index number represents the location of the add-in in the list of add-ins in the templates and Add-ins dialog box. The following instructions show the path of the first valid add-in.

If addins.count >= 1 Then MsgBox Addins (1). Path The following example creates an add-in list at the beginning of the active document. The list contains the name, path, and load state of each valid add-in.

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

Use the Add method to add an add-in to the list of valid add-ons and to load it with the install parameter (optional).

Addins.add filename:= "C:templatesotherletter.dot", Install:=true uses the installed property to load the add-in in the list of valid add-ins.

AddIns ("Letter.dot"). Installed = True Note that the compiled property is used to determine whether the AddIn object is a template or a WLL.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.