K
Khai
Hi - i have an interesting problem.
DDERequest returns an array of data, when used via Excel.
I have a program which accepts DDEExecutes, and stores the return value in
DDEText. This is a database program. If I wanted teh first name of the
entry, here's what it'd look like.
dim Oad as Long
oad = DDEInitiate("oadbook","accel")
DDEExecute oad,"Getname First"
mystr = DDERequest(oad,"DDEText")(1) <- 1st item in returned array.
DDETerminate oad
msgbox mystr
returns say "John"
that works. Fine, fine and dandy. With cherries too..
however, here's the glitch, and as much info as I can tell. There's a Notes
section. Word (which doesn't return an array with DDERequest) can handle
DDEExecute oad, "Getnotes all"
msgbox DDERequest(oad,"DDEText")
DDETerminate
Following the logic, it stands DDERequest(oad,"DDEText")(1) would work in
Excel. Wrong. If I do ubound, it corresponds to the number of CR's (hard
returns) in the Notes section. So I think Excel's DDEREquest uses CR's to
seperate stuff in an array. If this is so, how can I make it NOT do that?
=)
any ideas? I need to get those notes, and don't want to have to fire a Word
instance, and a small sub just to do it. Thanks for any ideas. =D
-Khai
DDERequest returns an array of data, when used via Excel.
I have a program which accepts DDEExecutes, and stores the return value in
DDEText. This is a database program. If I wanted teh first name of the
entry, here's what it'd look like.
dim Oad as Long
oad = DDEInitiate("oadbook","accel")
DDEExecute oad,"Getname First"
mystr = DDERequest(oad,"DDEText")(1) <- 1st item in returned array.
DDETerminate oad
msgbox mystr
returns say "John"
that works. Fine, fine and dandy. With cherries too..
however, here's the glitch, and as much info as I can tell. There's a Notes
section. Word (which doesn't return an array with DDERequest) can handle
DDEExecute oad, "Getnotes all"
msgbox DDERequest(oad,"DDEText")
DDETerminate
Following the logic, it stands DDERequest(oad,"DDEText")(1) would work in
Excel. Wrong. If I do ubound, it corresponds to the number of CR's (hard
returns) in the Notes section. So I think Excel's DDEREquest uses CR's to
seperate stuff in an array. If this is so, how can I make it NOT do that?
=)
any ideas? I need to get those notes, and don't want to have to fire a Word
instance, and a small sub just to do it. Thanks for any ideas. =D
-Khai