SmartDocument.PickSolution Method
Displays a dialog box that allows the user to choose an available XML expansion pack to attach to the active document in Microsoft Office Word 2003 or Microsoft Office Word or a workbook in Microsoft Office Excel 2003 or Microsoft Office Excel.
Syntax
expression.PickSolution(ConsiderAllSchemas)
expression A variable that represents a SmartDocument object.
Parameters
| Name | Required/Optional | Data Type | Description |
|---|---|---|---|
| ConsiderAllSchemas | Optional | Boolean | True displays all available XML expansion packs installed on the user's computer. False displays only XML expansion packs applicable to the active document. Default value is False. |
Remarks
Use the PickSolution method to allow the user to select an XML expansion pack from a list. The schema attached to the active document or workbook determines which XML expansion packs are applicable.
The PickSolution method does not return a value to indicate whether the user selected an XML expansion pack or clicked Cancel in the dialog box. Check the SolutionID property after calling PickSolution to determine whether an XML expansion pack has been attached.
If the smart document developer has failed to specify "targetApplication" in the XML expansion pack manifest file, the list displayed by PickSolution may include XML expansion packs that are not targeted to the active application; for example, an Excel user may see XML expansion packs targeted exclusively to Word. In these circumstances, the user may select an XML expansion pack that is not appropriate for the active application.
For more information on smart documents or XML expansion packs for smart documents, please see the Smart Document Software Development Kit (SDK) on the Microsoft Developer Network (MSDN) Web site.
Example
The following example checks the SolutionID property to determine whether the active Microsoft Word document already has an attached XML expansion pack; if not, it displays a dialog box which allows the user to choose an available XML expansion pack. It then displays the properties of the smart document.
| Visual Basic for Applications |
|---|
|