LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DDE (CVI - Word) problems with XP

I need some pointers on how to debug a DDE issue with Word. Its a bit of a mess as you'll see, but I do have some very specific questions at the end.

I have a large CVI program that uses DDE to generate Word documents. It inserts text files and pastes graphics copied from a CVI panel. It has worked well until XP came along - with WinXP and Office XP Word hangs the second time ClientDDEExecute is used to send a FileSaveAs command. (It stops responding with the message in the bottom left of the status bar saying "Saving ____.doc")

Strangely, if I put a "Delay(2.);" before the save command, Word does not hang. BUT I now get a GPF on a later DiscardPanel call. Adding "Delay(2.)" before all ClientDDEExecute calls does not cure the GPF.


I've used msconfig to load only the essentials, with no success. It happens in and out of the debug environment.

But if I "fake" all DDEClientExecute calls to a dummy function the GPF does not happen, so I think it's Word related.

And this problem never happens with Word 97 - just Word 2002.

So my questions are:
1. Is there any potential problem with issuing a ClientDDEExecute command before the server (Word 2002) is done with the previous command? Word 2002 sometimes repaginates several times in a row and it can take some time, esp. with a big file (<100 pages).
(If there is a timing issue, can I use a warm or hot link to Word to know when to send the next command? What "Item Name" would I monitor?)
2. What can I do to debug the GFP? Atttempts to pare down the large program to a simple one that replicates the problem have been difficult & unsucessful to date.

Thanks in advance for any help!
0 Kudos
Message 1 of 2
(2,605 Views)
Hello

For the command used for monitoring the state of the app, you might need to check the Excel DDE reference to see if they have such a parameter and the syntax available.
You can also try using the SDK functions for DDE to see if they provide more insight into this problem, check out this link

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,605 Views)