Word 8 and OLE link problems of Word 6 / Word 7 docs

Word 8 and OLE link problems of Word 6 / Word 7 docs

Post by Mihran Mkrtchia » Tue, 08 Apr 1997 04:00:00

If I run OCLIENT from SAMPLES\MFC\OLE and try to insert as object (create
from file, link, display as Icon) some Word 6 / Word 7 document, I would
get "Failed to launch server applications".

Any idea?




1. ShellExecuteEx opening Word doc to print seems to freeze Word


I am using ShellExecuteEx with print as the option to print a number of Word
documents.  I need to wait for the Word document to do it's job and close
before running ShellExecuteEx again.

I have tried to use WaitForSingleObject to wait for the process to close
before moving on.  However, when I do this Word opens, the Word screen sort
of freezes and takes and age to close - I usuallu get the Word messagebox
"This is taking a long time ... do you want to wait? (or words to that

I load Word manually and then print it does the job painlessly, and quickly.

I feel this is a pretty fundamental problem - unfortunately I have no idea
how to solve.  Any help would be much appreciated.

My code:

   ZeroMemory(&sei, sizeof(sei));
   sei.cbSize = sizeof(sei);
   sei.fMask = NULL;
   sei.hwnd = NULL;
   sei.lpVerb = "print";
   sei.lpParameters = NULL;
   sei.lpDirectory = NULL;
   sei.nShow = SW_HIDE; //  SW_MAXIMIZE;
   sei.hInstApp = NULL;

// looping code

   sei.lpFile = temppath;

   bRet = ShellExecuteEx(&sei);

//   WaitForSingleEvent
   DWORD dwRet = WaitForSingleObject(sei.hProcess, 40000);

   if (dwRet == WAIT_TIMEOUT)
    MessageBox("Timeout on WaitForSingleObject");

// end of loop

2. Windows 2000 blue screen on startup

3. Help: OLE links in Word doc are hard coded

4. Which is better Borland C++ 5.0 or Visual C++ with Directx SDKs

5. Linking in Word 95, Opening with Word 97


7. Problems with Word 6.0a installed by Word and Office

8. Mail Alias

9. weird Word 6 -> Word 7 .WLL migration problem (window subclass)

10. Using OLE to convert Word docs

11. Using Visual Fox Pro 3.0 & OLE to open and merge print a WIN WORD Doc

12. Delete and Cut fails when programming MS Word if Word not visible

13. How to show a Word Document in Word Application