adrian said:
Hi Johnothan,
Thank you for your response.
I didnt make myself very clear I am afraid.
Actually what I want to do is this:-
'Create a sub folder
mkdir "C:\Incomplete\Images"
'create another subfolder
mkdir "C:\Incomplete\Images\Client"
OK, we've handled that in another thread.
Then programatically add a text file to the client folder
with the current date on the text file. This file will
then be used to provide the data for a date in a userform.
ie
Create a text document in "C:\Incomplete\Images\Client"
Write to this document todays date.
The reason I want to do it this way is that this mirrors
the way another program adds the date to the same folder
system. And in doing the same way, the date will also be
available to this other program.
I am afraid I do not know the correct term for this text
file, all I know is that the proprties show it as a Text
Document and it opens with Notepad.
You can do this by creating a Word document in the normal way using
Documents.Add, and then saving it using the SaveAs method, with
FileFormat:=wdFormatText. This saves the document as a plain text tile, and
not as a Word document. It will show up in Windows Explorer as a Text
document, and double-clicking it will open it in Notepad. It really does
work, try it!
Alternatively, you can use the basic file I/O commands that Mark Tangard has
suggested. I didn't suggest this initially, because I suspected you would be
more familiar with using VBA to create Word documents.
--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com