Addin Word with image

L

Luis Ricardo

I need to insert an object in the atual position of the cursor
(WordDocument).
This object is a picture and this picture when "double clicked"
must open an form with buttons, textbox .......

I am using VC 7.1 (.NET) and ATL.

I know how to design an Word Addin, but what can i insert
in to the actual position of the cursor ?

If anyone open this document without the Addin, what is displayed?

any ideia ??

thanks for help
(e-mail address removed)
 
C

Charles Jacobus

Luis.

Something like this should work (My source is VB, but you get the idea.)

Dim LeftPos As Variant: LeftPos =
m_WordApp.Selection.Information(wdHorizontalPositionRelativeToPage)
Dim VertPos As Variant: VertPos =
m_WordApp.Selection.Information(wdVerticalPositionRelativeToPage)
Set TheShape = m_WordApp.ActiveDocument.Shapes.AddPicture(ImageLoc, False,
True, LeftPos, VertPos, , , m_WordApp.Selection.Range)

Charles.
 
L

Luis Ricardo

Charles,

Thanks for help.




Charles Jacobus said:
Luis.

Something like this should work (My source is VB, but you get the idea.)

Dim LeftPos As Variant: LeftPos =
m_WordApp.Selection.Information(wdHorizontalPositionRelativeToPage)
Dim VertPos As Variant: VertPos =
m_WordApp.Selection.Information(wdVerticalPositionRelativeToPage)
Set TheShape = m_WordApp.ActiveDocument.Shapes.AddPicture(ImageLoc, False,
True, LeftPos, VertPos, , , m_WordApp.Selection.Range)

Charles.
 

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