Saving Page Layout view

G

Gary Dotzlaw

I have some very basic code that is trying to save a document in the Print
Layout view. However, it does not work. It appears as though once a document
is set to NORMAL view, it can never be set and saved to PRINT LAYOUT view.

Try this (no need to try it with VBA, it does not work any better):

- Create a new document. Set it to NORMAL view and save it.

- Now close the document.

- Reopen the document ans set it to PRINT LAYOUT view.

- Save the document and close it again.

- Now open the document once more, and notice it is still in NORMAL view. In
fact, once saved in NORMAL view, I can not get it to ever save in PRINT
LAYOUT view again.

What in the world is going on? Is this a bug with Word 2003 SP2.

The VBA code to set the PRINT LAYOUT view is
212 objDoc.ActiveWindow.View.Type = wdPrintView
214 objDoc.SaveAs FileName:=NewFileName,
FileFormat:=wdFormatDocument

But that doesn't work either.

Let me know if you have any ideas or workaround.

Gary
 
K

KePaHa

It works, but only if the doc is made dirty before closing it. If you open,
change views, save and close, no it won't be retained. But, if you open,
make a change to the file, change views, save and close, then the view is
retained.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top