How to: Add Pictures and Word Art to Documents
Some code examples in this topic use the this or Me keyword or the
You can add pictures and drawing objects to your documents at design time or during run time. WordArt enables you to add decorative text to Microsoft Office Word 2003 documents. These special text effects are drawing objects that you can customize and insert into your document.
At Design Time
You can use the Picture menu item to insert both WordArt and pictures into your document. You can also find these options on Drawing toolbar.
To add WordArt to your document at design time
Place your cursor at the position you want to insert the WordArt in the document.
On the Insert menu, click Picture, and then click Insert WordArt.
Select a WordArt Style from the WordArt Gallery dialog box and click OK.
Add the text that you want to appear in the document to the Edit WordArt Text dialog box and click OK.
The text is added to your document with the selected WordArt style applied.
To Add a Picture to your document at design time
Place your cursor at the position you want to insert the picture in the document.
On the Insert menu, click Picture, and then click From File.
In the Insert Picture dialog box, navigate to the picture you want to insert, and click Insert.
The picture is added to your document at the current cursor location.
At Run Time
You can insert pictures or WordArt programmatically into your document at the current cursor location.
To add a Picture to the document at the current selection
Call themethod of objects and pass in the name of the file.
To add WordArt to the document at the current selection
Get the left and top position of the current cursor location.
Call themethod of the object.
Compiling the Code
A picture named SamplePicture.jpg must exist on the C: drive.