C
captainido
Our VB6 application opens up Word documents using the following code:
lRet = ShellExecute(GetDesktopWindow(), sOperation, sFile, sArgs,
sDirectory, sShowCMD)
where...
GetDesktopWindow = Windows API function that returns a handle to the
desktop window
sOperation = "open"
sArgs = ""
sDirectory = vbNullString
sShowCMD = SW_SHOW = 5
every once in a while, when we open a document using this code, Word
opens up with the following problems:
1. if we make any changes and close the document, Word does not prompt
us to save.
2. Most dialogs don't open: properties, save as, etc. The Templates
dialog does open for some reason.
After this happens once, any other document opened through our program
will open the same way. However, if we open any document (including the
one that caused the problem) directly from explorer - everything works
fine.
After the problems occurs once, we can only stop it by exiting our
application and re-starting it.
We are not sure yet since we could not reproduce the problem, but it
MAY be happening only with documents whose Document Template is
missing.
Any help would be most appreciated!
lRet = ShellExecute(GetDesktopWindow(), sOperation, sFile, sArgs,
sDirectory, sShowCMD)
where...
GetDesktopWindow = Windows API function that returns a handle to the
desktop window
sOperation = "open"
sArgs = ""
sDirectory = vbNullString
sShowCMD = SW_SHOW = 5
every once in a while, when we open a document using this code, Word
opens up with the following problems:
1. if we make any changes and close the document, Word does not prompt
us to save.
2. Most dialogs don't open: properties, save as, etc. The Templates
dialog does open for some reason.
After this happens once, any other document opened through our program
will open the same way. However, if we open any document (including the
one that caused the problem) directly from explorer - everything works
fine.
After the problems occurs once, we can only stop it by exiting our
application and re-starting it.
We are not sure yet since we could not reproduce the problem, but it
MAY be happening only with documents whose Document Template is
missing.
Any help would be most appreciated!