WD: DDE Error: Session Too Complex. Please Close a Window. |
Q102018
If Microsoft Word or another application cannot open any additional dynamic data exchange (DDE) channels, the following message may be displayed:
Word 6.0, 7.0 in the following sequence
Too Many DDE Channels are open please close a window.
Cannot access remote Data (topic) Do you want to start the application <application>? Error 500: Cannot initiate link.Word 2.0x
Session too complex. Please close a window.
In order to open another DDE channel, a previous DDE channel must be closed.
When using DDE to communicate between applications, a separate "channel" or line of communication for each DDE conversation is created. It is possible to have multiple DDE conversations happening at the same time. While there is no absolute limit to the number of DDE conversations that can exist simultaneously, there is a relative limit that depends on the amount of system resources available. This limit will vary from system to system.
WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT
YOUR OWN RISK. Microsoft provides this macro code "as is" without
warranty of any kind, either express or implied, including but not
limited to the implied warranties of merchantability and/or fitness
for a particular purpose.
To prevent the error message from occurring, terminate each DDE
conversation after you are finished using the channel. To terminate a
DDE channel, use either of the following WordBasic commands:
For example, the following macro uses DDETerminate to close each DDE channel that is initiated.Syntax to terminate a specific channel number
DDETerminate(ChannelNumber) -or-Syntax to terminate all DDE channels
DDETerminateAll
Sub Main
For x = 1 to 40
chan = DDEInitiate("Excel", "Sheet1")
'Your other commands go here
DDETerminate chan
Next x
End Sub
To reproduce the "Session too complex...." error message, open Word
and Excel and run a macro that opens a number of DDE channels without
terminating the channels.
Sub Main
For x = 1 to 40
n = DDEInitiate("Excel","Sheet1")
Next x
End Sub
"Using WordBasic" by Wextech and Microsoft, pages 171, 172
Additional query words: channel dynamic data exchange
Keywords : kbwordvba
Issue type :
Technology :
|
Last Reviewed: November 4, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |