how to get the coordinate of top-left of the visible part in current document?

E

eaudouce

i want to insert a picture at current position, which the picture will be
visible and need no scrolling,
but if the document is scrolled, i can't get the position where to insert it.

when scrolling the document, VerticalPercentScrolled will change to reflect
the current position of
the document, how can i get the coordinate the top-left of the visible part
of the document relative to
the beginning of the document?
 
W

Wendell A. Clark

I have done this using a field
// inside a function

ActiveDocument.Bookmarks("Field").Select
Selection.MoveUp Unit:=wdLine, Count:=1

On Error Resume Next '//so if it doesn't exist it doesn't die

SaveWithDocument:=True
Selection.InlineShapes.AddPicture FileName:="c:\picture.jpg",
LinkToFile:=False, SaveWithDocument:=True

// back out of function now ;-)

it will drop the picture from c:\picture.jpg into the document replacing the
field

--
Wendell A. Clark, BS
-------------------------------------

CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may
contain confidential and privileged information for the use of the
designated recipients named above. If you are not the intended recipient,
please notify us by reply e-mail. You are hereby notified that you have
received this communication in error and that any review, disclosure,
dissemination, distribution or copying of it or its contents is prohibited.
If you have received this communication in error, please destroy all copies
of this communication and any attachments. Contact the sender if it
continues.
 

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