JimmyS
11-09-2007, 03:33 PM
I use the below code to create a word document.
header("Content-Type: application/msword");
header('Content-Disposition: attachment; filename="dossier.doc"');
Everything works perfectly except one thing. When the file is first opened it is in Web Layout view in word, if you change it to Print Layout view and save it, then when you open it next it will open in print view.
I read that the file itself says which view is default for it, so I was wondering if there was a way to set this default using php will creating the file.
It would be best if it was compatible with MS Office 2003 and 2007. Any help would be appreciated.
header("Content-Type: application/msword");
header('Content-Disposition: attachment; filename="dossier.doc"');
Everything works perfectly except one thing. When the file is first opened it is in Web Layout view in word, if you change it to Print Layout view and save it, then when you open it next it will open in print view.
I read that the file itself says which view is default for it, so I was wondering if there was a way to set this default using php will creating the file.
It would be best if it was compatible with MS Office 2003 and 2007. Any help would be appreciated.