WordBasic Examples: Insert CommandsLast reviewed: July 30, 1997Article ID: Q106199  | 
	
	
 
 
The information in this article applies to:
 
 SUMMARYThis article contains an example that demonstrates the use of the following WordBasic statements or functions: 
 InsertSound InsertWordArt InsertChart InsertDatabase InsertDrawing InsertEquation InsertExcelTableThis article supplements the information in online Help. To open this Help topic, choose Contents from the Help menu and then choose the "Programming with Microsoft Word" topic. WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. 
 InsertSound
 SyntaxInsertSound 
 InsertWordArt 
 SyntaxInsertWordArt 
 All of the commands listed above follow the same syntax as InsertSound and InsertWordArt. The only exception is InsertDatabase. A syntax example for InsertDatabase follows: 
 InsertDatabase
 SyntaxInsertDatabase [.Format = number] [, .Style = number] [, .LinkToSource = number] [, .Connection = text] [, .SQLStatement = text] [, .SQLStatement1 = text] [, .PasswordDoc = text] [, .PasswordDot = text] [, .DataSource = text] [, .From = text] [, .To = text] [, .IncludeFields = number] 
 Macro Example
 Sub MAINBegin Dialog UserDialog 306, 214, "Object Selector"     GroupBox 45, 25, 204, 150, "Insert which type of object?"
    OptionGroup  .OptionGroup1
        OptionButton 57, 50, 111, 16, "InsertSound", .OptionButton1
        OptionButton 57, 65, 123, 16, "InsertWordArt", .OptionButton2
        OptionButton 57, 80, 103, 16, "InsertChart", .OptionButton3
        OptionButton 57, 110, 123, 16, "InsertDrawing", .OptionButton4
        OptionButton 57, 125, 128, 16, "InsertEquation", .OptionButton5
        OptionButton 57, 140, 146, 16, "InsertExcelTable", .OptionButton6
    OKButton 47, 186, 88, 21
    CancelButton 162, 186, 88, 21
End Dialog
Dim dlg As UserDialog
On Error Goto bye
Dialog dlg
choice = dlg.optiongroup1
Select Case choice
Case 0 InsertSound Case 1 InsertWordArt Case 2 InsertChart Case 3 InsertDrawing Case 4 InsertEquation Case 5 InsertExcelTableCase Else End Select bye: End SubKbcategory: kbusage kbmacro KBSubcategory: kbmacroexample  | 
	
	Additional query words: 6.0 winword word6 6.0a 6.0c 7.0 word95 
 © 1998 Microsoft Corporation. All rights reserved. Terms of Use.  |