I have to produce print files with the suffix ".MEM". I have found that if I
put in filename XYZ.MEM I get XYZ.MEM.prn, but I can get round this by
printing to file, selecting the correct folder and entering file name in
quotes "XYZ.MEM". I would like to automate this for the user entering the
full location c:\my folder\"XYZ.MEM", but this is rejected as an invalid file
name. Can anyone suggest a way round this problem?
Thanks
Dudley
>I have to produce print files with the suffix ".MEM". I have found that if
>I
[quoted text clipped - 4 lines]
> file
> name. Can anyone suggest a way round this problem?
You automate this using the Printout method. Set the OutputFileName
parameter to the full pathname of the file including the filename extension,
"c:\my folder\XYZ.MEM" in your example, and set PrintToFile to True

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
Dudley - 07 May 2006 15:48 GMT
Thanks for that. I had actually done what you suggested, but I had only
looked at the result when I did 'record macro', and the filename was
'.MEM.prn'. When I do 'run macro' it comes out OK as '.MEM'.
Regards
Dudley
> >I have to produce print files with the suffix ".MEM". I have found that if
> >I
[quoted text clipped - 8 lines]
> parameter to the full pathname of the file including the filename extension,
> "c:\my folder\XYZ.MEM" in your example, and set PrintToFile to True