DDEExecute (1 Viewer)

asid

Registered User.
Local time
Today, 17:22
Joined
Jan 25, 2006
Messages
22
Hi

I have been given an old application to fix in Access 97 that works fine under Windows 95. Under Windows XP it fails. The issue is with the DDEExecute command. It appears that left and right parenthesis are not been sent to the external application that is expecting them.
I need to know how to send a left and right parenthesis () within a string. I cannot make it work, please help!!!

With the strings below the parenthesis do not transfer, no matter where they occur within the string.

DDEExecute chan,"()” this returns nothing
DDEExecute chan,"Hello World(” this left parenthesis does not transfer
DDEExecute chan,"(Hello World)” this left and right parenthesis do not transfer.
Thank you
 

boblarson

Smeghead
Local time
Yesterday, 22:22
Joined
Jan 12, 2001
Messages
32,059
Give this a try -- use the CHR function:

DDEExecute chan, Chr(40) & "Hello World" & Chr(41)
 

asid

Registered User.
Local time
Today, 17:22
Joined
Jan 25, 2006
Messages
22
Thanks, I tried this and only Hello World makes it through. I am using Word as a testbed. Any other siggestions?
 

asid

Registered User.
Local time
Today, 17:22
Joined
Jan 25, 2006
Messages
22
Here is an example of the code if anyone can assist

Dim AppName, Topic, Temp
Dim chan As Single


chan = DDEInitiate("winWord", "System") 'Must be open
DDEExecute chan, CStr(Chr(40) & "Hello World" & Chr(41))
DDETerminate chan

'returns Hello World
I require the ( ) to be passed down the string
(Hello World)
or Hello (World)

Thank you.
 

WayneRyan

AWF VIP
Local time
Today, 06:22
Joined
Nov 19, 2002
Messages
7,122
asid,

No real answers here.

Word supports DDE, but IT won't accept "()", "{}", "[]" over the channel.

Even if you try the "normal" tricks like --> "((Hello World))".

You could put together unique strings that represent the (){}[] chars,
then use Word VBA function to "change them back" to the proper characters.

But, if you EXPLICITLY have to pass those characters over the DDE channel,
I have no other ideas.

Wayne
 

Users who are viewing this thread

Top Bottom