|
-
March 31st, 1999, 05:44 AM
#1
ShellExecute
i want to start winword with a doc-file based on a dot-file
the following line works :
HINSTANCE hinst = ShellExecute (NULL,"open","C:\\xxx.dot",NULL,NULL,SW_SHOW);
but not the next two lines :
HINSTANCE hinst = ShellExecute (NULL,"open","C:\\xxx.dot","/t",NULL,SW_SHOW);
HINSTANCE hinst = ShellExecute (NULL,"open","C:\\xxx.dot /t",NULL,NULL,SW_SHOW);
-
December 15th, 2000, 03:29 AM
#2
Re: ShellExecute
Well first off, what does "doesn't work" mean? Returns an error code? Locks up your computer? Sends nasty messages to the Chinese Prime Minister? (And a corollary to that would be what does it mean that the first call "works?" If so, why do you need to seek further?)
I assume, however, that the first call opens winword okay with the document, but you want to add the functionality of a command line parameter. Since you're calling ShellExecute with the name of a document, you may not use a parameter (as indicated in the MSDN). An option might be rather to call winword directly, say :
ShellExecute(NULL, "open", "winword", "c:\xxx\document.dot /t", NULL, SW_SHOW);
If this doesn't satisfy your needs, post more info so I know better what's going on.
Walter Gildersleeve
Freiburg, Germany
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|