01 Mayıs 2012 Salı 12:05
I have developed a VSTO using visual studio 2010 for office word. The version of Word is 2010.
I want to get keybord position, the following. How to get keybord position.
( C# 4.0 / Word 2010/ Visual Studio 2010 )
thanks in advance.
- Düzenleyen vsmmma 01 Mayıs 2012 Salı 15:08
01 Mayıs 2012 Salı 16:48
The Word Primary Interop Assemblies (PIAs) don't provide for that....hopefully someone can still help you, though.
Good diagram. Helpful, also, is the word 'caret' (in terms of Word programming this is also referred to with the terms 'insertion point' and 'selection').
01 Mayıs 2012 Salı 21:06Moderatör
The only thing the Word object model offers is the ActiveWindow.GetPoint method for the Range object. It's not 100% accurate but might help you...
Cindy Meister, VSTO/Word MVP
01 Mayıs 2012 Salı 21:17Do ranges have a GetPoint method (or a 'Windows' property)? It's not listed on MSDN (as a range member) and my VS intellisense won't pick it up.
02 Mayıs 2012 Çarşamba 02:37
Thank you for your help, JosephFox, Cindy Meister.
I could succeed.
Thank you very much.
my code ...
Word.Range r = Globals.ThisAddIn.Application.Selection.Range; int left, top, width, height; Globals.ThisAddIn.Application.ActiveWindow.GetPoint(out left, out top, out width, out height, r);
02 Mayıs 2012 Çarşamba 14:06Ah, I see! I guess I'm a little slower than you and Cindy.
- Düzenleyen JosephFox 02 Mayıs 2012 Çarşamba 14:07 punctuation change