Oppss... I used the wrong term. I meant the keyboard cursor position, i.e.
where the next character will be displayed when the user types in.
Thanks,
Josh
>>> I'm trying to insert an image where the caret is position. I am
>>> managing to insert an image. The problem is to find the position
>>> where the caret is. Does anyone know how I can get the caret position?
You can get close to what you need by recording a macro while inserting your
image and then examining the code. Recorded macros normally use the
'selection object' so that they work on what is currently selected in the
document.
The code snippet below checks whether the selection is just an 'insertion
point' and nothing else is selected before adding a picture to the document
at that insertion point. The space, underscore marks at the end of the two
lines are continuation markers; meaning that everything in the middle is
actually one continuous line of code.
If Selection.Type = wdSelectionIP then
Selection.InlineShapes.AddPicture fileName:= _
"C:\Your\Path\To\Picture.png", LinkToFile:=False _
, SaveWithDocument:=True
End If
> Oppss... I used the wrong term. I meant the keyboard cursor position, i.e.
> where the next character will be displayed when the user types in.
[quoted text clipped - 24 lines]
>>>
>>> Josh

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
Russ - 09 Jun 2007 09:43 GMT
If you needed to know a more geometric, dimensional location of the
insertion point within the page, then I suggest looking at the 'Information
Property' in VBA Help.
>>>> I'm trying to insert an image where the caret is position. I am
>>>> managing to insert an image. The problem is to find the position
[quoted text clipped - 46 lines]
>>>>
>>>> Josh

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID