How to Insert Image in WORDEditor

  • Thread starter Thread starter Himanshu Upadhyay
  • Start date Start date
H

Himanshu Upadhyay

Hi

I want to insert Image at Current Cursor Position using
WORDEditor.

In HTMLEditor i did it
HTMLEditor.Selection.createRange.pasteHTML("<img
src='imgpath'>")

but i don't know how same can be done in WORDEditor.

any one have any idea.....?

Thanx in Advance

Himanshu Upadhyay
 
WordEditor returns a Word.Document object. From that point you need to use
Word code. If no text is selected you could use
Word.Document.ActiveWindow.Selection to get the insertion point you want.
You can check for the Start and End of the Selection to see what is selected
and then use the InsertAfter or InsertBefore methods to insert what you want
at that location.
 
Hi Ken Slovak

Again thanx a lot.
I used
ActiveWindow.Selection.InlineShapes.AddPicture

Regards
Himanshu
 
Back
Top