How to Insert Image in WORDEditor

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
 
K

Ken Slovak - [MVP - Outlook]

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

Himanshu Upadhyay

Hi Ken Slovak

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

Regards
Himanshu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top