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 / October 2007

Tip: Looking for answers? Try searching our database.

Dear Developers, A Noob Question...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kafka - 28 Oct 2007 11:14 GMT
Dear guys and girls,
I've been trying to do this task for a while now, I can't seem to find any
meaningful information about it so I really hope someone here could help.
I've started writing an add in for MSWord, I'm trying to locate a word
within a document and by the selection (cursor) position in the document I
would like to add some of my own graphics (for UI). The problem I have is
getting the information off the Word API. How Do I by character position get
the Absolute Screen position and the reverse, how do I from the Screen X-Y
get the Character position.
Hope the my question phrasing is ok, It's abit too early in the morning for
pretty theoretics.
Many thanks and a Great day to us all.
Helmut Weber - 28 Oct 2007 11:54 GMT
Hi Kafka,

are you sure you want the absolute "screen" position?

Or isn't it rather about the position of a word in a document
relative to page or text borders?
Like: first occurance of "graphics" is located 5 cm
from page top and 8 cm from page left?

I don't think you want your graphis appear at a certain position
on the screen but at a certain position on a page.

In Points:
MsgBox Selection.Information(wdHorizontalPositionRelativeToPage)
MsgBox Selection.Information(wdVerticalPositionRelativeToPage)

>how do I from the Screen X-Y get the Character position.

Don't think this is feasable, at least not with justifiable effort.
What good would it be for to know,
what character is at position(300,400) on the screen?
Quite some times there might not be a character at all.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

Kafka - 28 Oct 2007 14:41 GMT
Many thanks!

> Hi Kafka,
>
[quoted text clipped - 18 lines]
> what character is at position(300,400) on the screen?
> Quite some times there might not be a character at all.
 
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.