Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to use CreateProcess to open a long-file-name file with winword

62 views
Skip to first unread message

Jesse Bush

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
Has any one had good success using CreateProcess() to command winword to
open a long-file-name file? For the 8.3 files everything works fine. When a
long-file-name or long-directory-name is used winword launches but an error
message inform that the file or directory is invalid. many thanks.

Charles Steinhardt

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
Jesse,

trying enclosing be long filename parameter with quotes.

"winword \"my long file name.doc\""


Charles Steinhardt[MVP]
(To Email: remove NO_SPAM_NO from return address)


Phaedrus

unread,
May 7, 1999, 3:00:00 AM5/7/99
to
In article <OHznkmJm#GA....@cppssbbsa02.microsoft.com>,

If the file's path contains any spaces, you must put that file path
_in quotes_ in the command line string. For example,

CreateProcess(NULL,
"C:\\WORD\\WINWORD.EXE C:\\My Documents\\Sales Report.doc", [...] );

will fail, but

CreateProcess(NULL,
"C:\\WORD\\WINWORD.EXE \"C:\\My Documents\\Sales Report.doc\"", [...] );

will succeed.
--
\o\ If you're interested in books and stories with transformation themes, \o\
/o/ please have a look at <URL:http://www.halcyon.com/phaedrus>. Thanks! /o/
\o\ FC1.21:FC(W/C)p6arw A- C->++ D>++ H+ M>+ P R T++++ W** Z+ Sm RLCT \o\
/o/ a cmn++++$ d e++ f+++ h- i++wf p-- sm# /o/

0 new messages