Export (0) Print
Expand All

How to: Add Pictures and Word Art to Documents

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Document-level projects

  • Application-level projects

Microsoft Office version

  • Word 2003

  • Word 2007

For more information, see Features Available by Application and Project Type.

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 documents. These special text effects are drawing objects that you can customize and insert into your document.

If you are developing a document-level customization, you can add a picture to the document at design time. The procedure is different for Word 2003 and Word 2007.

To add a picture to a Word 2003 document at design time

  1. Place your cursor where you want to insert the picture in the document.

  2. On the Insert menu, click Picture, and then click From File.

  3. 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.

To add a picture to a Word 2007 document at design time

  1. Place your cursor where you want to insert the picture in the document.

  2. Click the Insert tab of the Ribbon.

  3. In the Illustrations group, click Picture.

  4. 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.

You can insert a picture into a document at the current cursor location.

To add a picture at the cursor location

If you are developing a document-level customization, you can add WordArt to the document at design time. The procedure is different for Word 2003 and Word 2007.

To add WordArt to a Word 2003 document at design time

  1. Place your cursor where you want to insert the WordArt in the document.

  2. On the Insert menu, click Picture, and then click Insert WordArt.

  3. Select a WordArt Style from the WordArt Gallery dialog box and click OK.

  4. 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 WordArt to a Word 2007 document at design time

  1. Place your cursor where you want to insert the WordArt in the document.

  2. Click the Insert tab of the Ribbon.

  3. In the Text group, click WordArt, and then select a WordArt style.

  4. 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.

You can insert WordArt into a document at the current cursor location. The procedure is different for document-level customizations and application-level add-ins.

To add WordArt at the cursor location in a document-level customization

  1. Get the left and top position of the current cursor location.

    float leftPosition = (float)this.Application.Selection.get_Information(
        Word.WdInformation.wdHorizontalPositionRelativeToPage);
    
    float topPosition = (float)this.Application.Selection.get_Information(
        Word.WdInformation.wdVerticalPositionRelativeToPage);
    
  2. Call the AddTextEffect(MsoPresetTextEffect, String, String, Single, MsoTriState, MsoTriState, Single, Single, Object) method of the Shapes object in the document.

    this.Shapes.AddTextEffect(
        Office.MsoPresetTextEffect.msoTextEffect29, "SampleText",
        "Arial Black", 24, 
        Office.MsoTriState.msoFalse, Office.MsoTriState.msoFalse,
        leftPosition, topPosition, ref missing);
    

To add WordArt at the cursor location in an application-level add-in

  1. Get the left and top position of the current cursor location.

    float leftPosition = (float)this.Application.Selection.get_Information(
        Word.WdInformation.wdHorizontalPositionRelativeToPage);
    
    float topPosition = (float)this.Application.Selection.get_Information(
        Word.WdInformation.wdVerticalPositionRelativeToPage);
    
  2. Call the AddTextEffect(MsoPresetTextEffect, String, String, Single, MsoTriState, MsoTriState, Single, Single, Object) method of the Shapes object of the active document.

    this.Application.ActiveDocument.Shapes.AddTextEffect(
        Office.MsoPresetTextEffect.msoTextEffect29, "SampleText",
        "Arial Black", 24, Office.MsoTriState.msoFalse, 
        Office.MsoTriState.msoFalse, leftPosition, topPosition, ref missing);
    

  • A picture named SamplePicture.jpg must exist on drive C.

Community Additions

ADD
Show:
© 2014 Microsoft