Make your own free website on Tripod.com

.NET-plugins for MS Office 2003 and Visual Studio

Russian version
Similar programm


Supporting  of plugins  for the Office System 2003 and Visual Studio created with use of Microsoft .Net Framework.

ARCHITECTURE

Shared COM-Addin "Office2003.Plugins" is the dispatcher of .NET-plug-ins.
After start of a host program the dispatcher loads from assemblies in a folder bin\Plugins the classes being successors of base class DkmS.Office2003.OfficePlugin.
Plug-ins are loaded only into the programs specified by attribute LoadIn. For start of plug-ins are useditems of the dropping out menu that is accessible after pressing button Plugins which is added by the dispatcher to the basic tool panel of a host at loading.
Plug-ins can be added and deleted without restarting of a host program.

INSTALLATION:

  • Components function on computers with Windows 98/2000/XP/2003
  • It is necessary to establish last version Microsoft .NET Framework (not below 1.1)
  • Take from archive and start installer Office.Plugins.Setup.msi.
  • Take from archive office.plugins.1.6.zip and start installer Office.Plugins.Setup.1.6.msi.
  • Take from archive office.plugins.1.6.zip folder Office2003.Plugins with preservation of structure enclosed subfolders in an installation site of the loader (by default - C:\Program Files\DkmS\)

Plagins in delivery

  1. HelloWorld.dll  - in programs Word, Excel and Outlook shows message with name of host. For a conclusion of the message component Assistant is used.
  2. HelloSrc.vb - in all hosts shows message with name of host.
  3. HelloWord.vb, HelloXL.vb, HelloOlk.vb - shows message with name of host in Word, Excel and Outlook accordingly with use of the specialized classes .
  4. Word2003CW.dll - complete words in MS Word.

    Wrutten in C# VB.NET.

Programming of plugins

The folder \HelloWorld contains initial texts of plug-in HelloWorld.dll in language C# (the project for Visual Studio 2003 .NET). In a folder \bin\Plugins there are plug-ins in source in language VB.NET

Describe a class derivative from classes OfficePlugin, wordPlugin, outlookPlugin, excelPlugin, realizing algorithms necessary for you.
Algorhitms describe in method public override void DoAction (Public Overrides Sub DoAction for VB.NET).
Override method public override void InitializePlugin (object App, CommandBarControl Menu) for creating own command elements etc.

By means of attributes LoadIn describe names of hosts for a plug-in, attribute PlugName set an caption on the button to start your plug-in. (At inheritance from the specialized classes attribute LoadIn is not required)

For use of a subsystem of preservation of a configuration of plug-ins in the plug-in add the property having type, derivative of class DkmS.Office2003.Config. At use of the specialized plug-ins it is in addition possible to define public override void methods RestoreConfig () and SaveConfig () which are called at loading and unloading of a plug-in accordingly.

At use as the prototype of a class wordPlugin there is an opportunity through attribute ShortKeyAttribute (string) to set a hot key for start of a plug-in (string has the syntax used in method SendKeys from Windows Scripting Host). For example, in HelloWord.vb combination "Shift+Ctrl+SpaceBar" is set by means of attribute ShortKey ("+^ ").

At compilation connect (References...) assembly Office2003.PluginDef.dll and Office2003.Plugins.dll (for use of the specialized classes)
Result of compilation place in a folder bin\plugins, reload plagins through item of the menu Plugins => Configure Plugins for...


Remark.
In the same folder place the assembly (library) used by yours plagin.
 

% Loading archive with the program: site-1.

   Main page            Other plug-ins