I'm not sure I understand why you're wanting to do this or what you mean by 'cursor'. If you're referring to the mouse pointer, then I'd agree with marto that Win32::OLE probably won't do that.
However, if you're referring to the flashing 'cursor' inside Word that indicates where the next character you type will go, then this might be possible. Basically, the concept would be the following:
- Use Win32::OLE to open Word and the desired Word document. Do this with the option to make Word visible.
- Issue the Word commands to move the 'cursor' to the desired location within the document.
- Have your code exit without closing Word. (Never tried this, so I don't know if this step will work properly or as desired.)
I'm sure that you would love to have seen code to do this and I would have preferred to give some code too. However, I'm posting this from a system that does not have Word installed and does not have access to any of the code that I have written to interact with Word. If I get a chance later this week, I'll post an update with some syntax for the make visible part and the cursor movement in Word.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.