Article View: comp.windows.ms
Article #13402Execute Excel commands from an external program
From: LTH network news server
Date: Tue, 20 Dec 1988 14:32
Date: Tue, 20 Dec 1988 14:32
36 lines
2009 bytes
2009 bytes
I am trying to excute commands in Excel from an other window program.
As I understand it I should first send a WM_DDE_INITIATE to all
windows like this:
wDDEServer = GlobalAddAtom ("Excel");
wDDETopic = GlobalAddAtom ("System");
SendMessage(0xFFFF, WM_DDE_INITIATE, hWnd,
MAKELONG(wDDETopic, wDDEServer));
And then I should wait for a WM_DDE_ACK from Excel (which should be
the only window answering for these parameters) and extract HWND
handle for the Excel window. Then I can send WM_DDE_EXECUTE messages to
that specific HWND for Excel and it will hopefully work... :-)
Now, the problem is that Excel will not answer the WM_DDE_INITIATE
message. I have used "spy" to verify that Excel really gets the
message, but it doesn't respond.
Anyone knowing what is wrong? I am using MS-Windows 2.03 and
corresponding version of Excel (2.1?, > 2 I am sure, but I dont have
the manuals with me at home).
I would be very pleased for any comment on this matter!
/Richard
_______________________________________________________________________________
Richard Niklasson ! INTERNET: rn@tts.lth.se
Dept of Communication Systems ! DUMB ARPA MAILERS: rn%tts.lth.se@uunet.uu.net
Lund Institute of Technology ! UUCP: ...!<uunet,mcvax,munnari>!enea!tts.lth!rn
Box 118 ! EARN/BITNET: erlangrn@seldc51
S-221 00 LUND ! VAXPSI: psi%24020031020720::erlang::rn
Sweden ! PHONE: int+46 46 109008 FAX: int+46 46 145823
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<1988Dec20.153220.26914@LTH.Se>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!enea!kth!draken!Urd!newsuserShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!enea!kth!draken!Urd!newsuser From: newsuser@LTH.Se (LTH network news server) Newsgroups: comp.windows.ms Subject: Execute Excel commands from an external program Message-ID: <1988Dec20.153220.26914@LTH.Se> Date: 20 Dec 88 14:32:20 GMT Reply-To: rn@tts.lth.se (Richard Niklasson) Organization: Communication Systems, Lund Institute of Technology, Sweden Lines: 36