Monday, May 25, 2009

Issue: Custom Functionality in Workpapers

Issue: In some cases, users will need (or should have) custom functionality within Word, Excel, or PDF documents to enhance their workflow or reduce required time on the workpaper.

Resolution: Just because documents are stored in Engagement doesn't mean that users can't have custom functionality in the Office suite applications. One great thing about Word and Excel is that Microsoft created them to be open enough for developers to create functionality that does not exist out of the box. (On a side note, some open source office suites provide similar custom functionality options.) Acrobat also has custom functionality options similar to Microsoft products but I will stick to Word and Excel.

There are two main ways to create custom functionality in Word or Excel (or any Microsoft Office application): (1) Macros stored in a file or (2) a custom add-in. A short discussion of each as they relate to Office 2003 is below.

Macros stored in a file

Many users have done this and may not know it. If you have recorded a macro and stored it in the Normal.dot (Word) or Personal.xls (Excel) you have done a simple form of this. Macros can be recorded or written from scratch depending on their complexity. The more complex a macro is, the more "writing" from scratch you'll have to do. Once the macro is finished, it will need to be stored in a special type of file; a template (.dot) for Word and an add-in file (.xla) for Excel. Both types of files are accessible from the "Save as..." option in the File menu from the applicable application. These file should then be saved in the appropriate folders on each users computer so the application knows they're safe to load at startup. A detailed example will be posted later.

A custom add-in

Custom add-ins are developed using an integrated development environment or IDE. Software developers and other advanced programmers use IDEs. Microsoft's Visual Studio is an example. IDEs offer functionality that macros don't enlarging the possibilities of the custom functionality but also may become more complex fairly quickly so be careful. A detailed example will be posted later. Distribution of a custom add-in is fairly easy once some setup is complete.

NOTE: Just about any custom functionality developed for Office 2003 will still work in Office 2007.

2 comments:

Anonymous said...

I have created macros for Word and that are designed to run on startup of Word (autorun). It seems that some of the Word add-ins used by Engagement stop my autorun macro from running.

Rob Smith said...

I noticed the same problem with autorun addins. I created an addin that created a custom toolbar. Everytime I ran Word from Engagement the autorun macro seemed not to run.

However, I did some more testing and found that it was actually running but since I was trying to change the application while it was hidden (Engagement hides the instance of Word it creates until everything is customized and ready for the user) it wasn't running my code.

The only way I found to get around this proplem was to show the instance of Word before I ran the rest of my code. Hope that helps.