Share via


Ways to Develop a Smart Document [Office 2003 SDK Documentation]

Microsoft® Office 2003 includes two mechanisms for developing smart documents. The first method provides basic functionality without the need to write code; the second provides full extensibility for more complex smart documents. The complexity of your implementation will determine which option is right for you.

Basic smart documents

If your smart document implementation does not require the full power of the Smart Document API, you can build simple smart documents by writing an XML file that conforms to the Microsoft Office Smart Tag List (MOSTL) Schema. This option allows you, without writing any code, to quickly and easily create smart documents that can display labels, Help text, and document fragments in the task pane, that can insert and remove content from an XML node, and that can open a Web page in a Web browser when clicked.

For more information about creating MOSTL-based XML smart documents, as well as a sample, see the Microsoft Office Smart Tag List reference.

More powerful smart documents

If your smart document implementation is more complex, you will need to write a smart document dynamic-link library (DLL) that implements the ISmartDocument interface. This interface allows you to write custom code to perform any action needed when the smart document is being used. There are two ways to implement the ISmartDocument interface to generate your smart document:

  • Create a COM smart document  You can create a custom smart document DLL in any programming language that supports the creation of Component Object Model (COM) add-ins. Examples of such languages include Microsoft Visual Basic® version 6.0 and Microsoft Visual C++® version 6.0.

  • Create a managed code smart document  You can also use managed code to create your custom smart document DLL by implementing the ISmartDocument interface in any programming language that supports the Microsoft .NET Framework. Examples of such languages include Microsoft Visual Basic® .NET, C#, and Microsoft Visual C++® .NET.

    Unlike earlier versions of Office, managed code is now supported directly from the application by using the Visual Studio® Tools for the Microsoft Office System loader, rather than requiring a COM wrapper. This makes using managed code in Office much simpler but also introduces new security checks through the .NET Framework. For more information about support for managed code smart documents, see Security for Smart Documents That Use the .NET Framework.