locked
how can insert image RRS feed

  • Question

  • Hi,


    iam developing com addin for word, powerpoint and excel, so now i need to insert a image into word using c#

    how can implement this please give a reply

    Thanks
    Vineeth
    Vineeth
    Tuesday, June 23, 2009 8:39 AM

Answers

  • Hi Vineeth

    When you're unfamiliar with the object model of an Office application it can often help to record a VBA macro while performing the task as an end-user. This will often give you the object, properties and methods required, although usually you can't use the VBA code "as is". You can get further information on the use of the object, properties and methods by clicking in the keyword then pressing F1 to call up the Help files.

    For Word, you'll find that images can be inserted using the AddPicture method of the Shapes and InlineShapes collections. Shapes have textflow formatting; InlineShapes are handled as characters in the text layout. If you search these terms here in the forum and in the Internet you'll find numerous discussions and code examples to get your started.

    If you need more help, you need to provide more information about exactly what your problem is.

    Cindy Meister, VSTO/Word MVP
    • Edited by Cindy Meister MVP Tuesday, June 23, 2009 8:56 AM Added last paragraph
    • Marked as answer by Tim Li Tuesday, June 30, 2009 2:44 AM
    Tuesday, June 23, 2009 8:55 AM