HighTechTalks DotNet Forums  

Word 2007 - Excel.Application.SendKeys equivalent?

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss Word 2007 - Excel.Application.SendKeys equivalent? in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Mike Loux
 
Posts: n/a

Default Word 2007 - Excel.Application.SendKeys equivalent? - 05-12-2009 , 10:34 AM






Does anybody know if there is an equivalent of
Excel.Application.SendKeys for Word 2007? I'm using the DSOFramer
control and am trying to programmatically close a Print Preview window
before saving and closing a doc (otherwise the application throws a
"Cannot access document when in modal condition" exception), and while
I can poll the application to see if it IS in Print Preview mode, I
can't seem to do anything about it.

I figured the easiest thing to do would be to send an escape keystroke
to Word, and while this would be no problem in Excel, Word does not
seem to have this function (at least not in the Primary Interop
Assemblies; there is a VBA equivalent, but that's not a feasible
solution at this time). Does anybody have any ideas? Thanks!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.