Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
eaudouce - 25 May 2006 07:01 GMT
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?
Wendell A. Clark - 31 May 2006 21:08 GMT
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

Signature

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.

>i want to insert a picture at current position, which the picture will be
> visible and need no scrolling,
[quoted text clipped - 8 lines]
> of the document relative to
> the beginning of the document?

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.