Introduction to the Tutorials [Office 2003 SDK Documentation]
In this section of the Microsoft® Office 2003 Smart Document Software Development Kit (SDK), you can find tutorials for creating smart documents in four programming languages, as well as a tutorial for creating the supporting XML expansion pack manifest files.
Where appropriate, these tutorials provide simple help in Microsoft Office Word 2003 for completing a task. For additional help on working with XML in either Word 2003 or Microsoft Office Excel 2003, refer to the Microsoft Office Word or Microsoft Office Excel Help. For more detailed information about developing XML solutions within Word, you can also refer to the Microsoft Office Word 2003 XML Content Development Kit. For additional sources of assistance, see Getting Assistance.
Supporting files
If you downloaded and installed the Office 2003 Smart Document SDK to the default location, you will find the following source files on your local computer in the C:\Program Files\Microsoft Office 2003 Developer Resources\Microsoft Office 2003 Smart Document SDK\Samples\SimpleSample\SourceFiles folder.
Note You will need a deployment folder for the tutorial. To create this deployment folder, create a new folder in a different location and copy the SimpleSample source files to this new folder.
If you are viewing the SDK online on MSDN®, the Microsoft Developer Network, you can download and install the complete SDK, including the supporting files, or you can click any of the following links for instructions on how to create these supporting files:
Manifest.xml (for COM smart documents) or ManagedManifest.xml (for managed code smart documents)
Note The XML expansion pack manifest file is not absolutely required for smart documents. You can manually enter the smart document information into the Schema Library registry subkey. However, the manifest file provides a mechanism for more easily deploying smart documents. For more information about deploying a smart document without an XML expansion pack, see Deploying Smart Documents Without Using an XML Expansion Pack.
SetPolicy.bat (for the Microsoft Visual Basic® .NET or C# tutorials only)
Note After you have completed the tutorials you should also create and run RemovePolicy.bat to remove FULLTRUST security permissions on the tutorial folders.
SimpleSample.xls (for the Microsoft Visual Basic 6.0 tutorial only)
Tutorials
These tutorials guide you through creating the SimpleSample smart document. They outline the basics of working with the Smart Document API and demonstrate how to create each of the different types of controls.
For managed code smart documents, you should make certain that you are using the primary interop assemblies for Microsoft Office 2003. These assemblies are generally stored at C:\WindowsFolder\assembly. If you do not have them installed, you will need to install them before following the Visual Basic .NET and C# tutorials.
How?
- In Microsoft Windows® Control Panel, open Add or Remove Programs, select your installation of Office 2003 and click Change.
- In the Microsoft Office 2003 Setup dialog box, select Add or Remove Features, and then click Next.
- Select Choose advanced customization of applications, and then click Next.
- Under Microsoft Office Word and Microsoft Office Excel, select Run from My Computer for .NET Programmability Support.
- Under Office Tools, select Run from My Computer for Smart Tag .NET Programmability Support.
- Click Update.
Creating a smart document
- Using Microsoft Visual Basic 6.0
- Using Microsoft Visual Basic .NET
- Using C#
- Using Microsoft Visual C++®
Important If you plan to follow more than one tutorial, you should delete the XML expansion pack after each tutorial to reduce the possibility of conflicts between smart documents that have the same namespace and use the same XML schema. To do this, select the XML expansion pack from the list of available XML expansion packs in the XML Expansion Packs tab in the Templates and Add-Ins dialog box on the Tools menu in Word or in the XML Expansion Packs dialog box on the XML submenu of the Data menu in Excel, and then click Delete.
Note For the sake of simplicity, the code in the tutorials does not include error handling. However, we encourage you to add error handling to your own smart document code.