SmartDocInitialize Method [Office 2003 SDK Documentation]

The SmartDocInitialize method runs when a user attaches an XML expansion pack to a document or when a user first opens a smart document.

Applies to

ISmartDocument

Syntax

[VB 6.0]

Private Sub ISmartDocument_SmartDocInitialize(ByVal ApplicationName As String, ByVal Document As Object, ByVal SolutionPath As String, ByVal SolutionRegKeyRoot As String)

[VB.Net]

Public Sub SmartDocInitialize(ByVal ApplicationName As String, ByVal Document As Object, ByVal SolutionPath As String, ByVal SolutionRegKeyRoot As String) Implements SmartTagLib.ISmartDocument.SmartDocInitialize

[C#]

public void ISmartDocument.SmartDocInitialize(string ApplicationName, object Document, string SolutionPath, string SolutionRegKeyRoot)

[C++ 6.0]

STDMETHOD(SmartDocInitialize)(BSTR ApplicationName, IDispatch * Document, BSTR SolutionPath, BSTR SolutionRegKeyRoot)

[C++ .Net]

STDMETHOD(SmartDocInitialize)(BSTR ApplicationName, LPDISPATCH Document, BSTR SolutionPath, BSTR SolutionRegKeyRoot)

Parameters

ApplicationName   The name of the application. You can use the ApplicationName parameter to customize a single smart document DLL to provide smart document actions in multiple Microsoft Office applications.

Document   A reference to the specific Microsoft Word Document object or Microsoft Excel Workbook object.

SolutionPath   The location where the solution is stored.

SolutionRegKeyRoot   The path in the registry where the manifest data for the solution is stored.

Remarks

Do not close a Microsoft Office Word 2003 smart document in the SmartDocInitialize method. Doing so will cause the application to crash.