(Window_Ref).GetPoint will return the position in the window of the Selection - in pixels. Form co-ordinates are measured in points so you will need to convert using PixelsToPoints. These numbers can be awkward to work with and may be unreliable but it is certainly better than nothing.
-- Enjoy, Tony
"Guillermo López-Anglada" <guillermo[ at ]deletethislopez-anglada.com> wrote in message news:%23%23BEDI4sHHA.4132[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text] > Hi, > > I have a form that opens on top of a doc so the user can perform a search. > The form is rather minimal, but it still gets in the way sometimes and > covers the search hit (selected text in the doc). > > I want the form to move out of the user's view. Since the search hit is > selected, I could use the insertion point's position on the screen as > reference, but I don't know how to do that in VBA or using an API call. > > Any help would be highly appreciated. > > Regards, > > Guillermo
|