Rob, Except that it works, which was why it was suggested ... try this (first a manual approach as proof of concept):
Run Explorer In the left-hand panel, highlight a folder C:\TEMP (say) Right click in the right-hand panel, then select New | Text Document You now have a new text document, zero bytes, with the default name New Text Document.txt waiting to be renamed. Rename it to (say) TestDoc.doc (its the '.doc' extension that counts of course). Now double click on this new document & Winword.exe (or whatever the default application for a '.doc' extension on your machine is) will open up with this document - which is what Stan asked for. Programatically AFAIK the simplest way to create such an empty file is to use the basic Pascal file handling routines (AssignFile, Rewrite, CloseFile) without actually writing any data to it - its quite quick & easy. John (Above example on Xp Pro SP2) > -------Original Message------- > From: Rob Kennedy <[EMAIL PROTECTED]> > Subject: Re: Opening Word (or OpenOffice) with only a filename (non-existing > file) > Sent: 12 Oct '07 00:18 > > jft wrote: > > As you already know how to use ShellExecute to open an existing file, > > why not just create an empty (zero byte) file with the desired name, > > in the desired path ... and then open an existing file! > > An empty file is not necessarily a valid document file. The program > trying to open it may reject it. The winword.doc file in my OS template > folder is 5 KB. > > -- > Rob > _______________________________________________ > Delphi mailing list -> [email protected] > http://www.elists.org/mailman/listinfo/delphi > _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

