ComponentOne Word for WinForms
Working with Word for WinForms / Basic Level Working / Inserting Pictures
In This Topic
    Inserting Pictures
    In This Topic

    You might need to insert images in your word document along with the text to enhance the overall appearance of your document. To do so, you can use the AddPicture method to insert picture in your word document and align it accordingly. The following code illustrates the use of AddPicture method and RtfHorizontalAlignment enum to set the horizontal alignment of the picture:

    Dim img As Image = New Bitmap(dlg.FileName)
    C1Word.AddPicture(img, RtfHorizontalAlignment.Left)
    
    Image img = new Bitmap(dlg.FileName);
    C1Word.AddPicture(img, RtfHorizontalAlignment.Left);                                    
                                    
    

    The document will look similar to the image below: