Link to home
Start Free TrialLog in
Avatar of jaygan
jaygan

asked on

Using Word/Excel SendKeys command from Delphi

Hi

I'm stuck and would really appreciate your help. How can you use Word's Sendkeys from Delphi?

I can't seem to make it work... I tried to do something similar with Excel. It doesn't work either :-(

Thank you very much in advance!

Regards,
Jay

var WordApp, WordDoc: Variant;
Begin
   WordApp := CreateOleObject('Word.Application');
   WordDoc:=WordApp.Documents.Open(FileName:=FN);
   WordApp.SendKeys ('Hello', True);
   ...
   WordApp.Quit;
end;
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial