E
E. Lehto
Hi everybody
I have a problem with a document template. The orientation of my template is set to landscape. When users opens the template, the code will check the preferred papersize from users settings (I'm having my own configuration utility for templates to set all defaults like interface language, papersize etc.).
In previous Word version (97 and 2000) changing papersize had no effect to the page orientation but now in Word 2002 when I'm changing the size through code i.e. from European A4 to US Letter, Word also changes the orientation of the page from landscape to portrait! If I do the same thing manually from File/Page setup menu, orientation does not change
The next problem is, that I cannot change the orientation programmatically back to landscape, because there is a bug in Word. An article in knowledgebase says (http://support.microsoft.com/default.aspx?scid=kb;en-us;275966)
-----------------------------------------------
"In Microsoft Word 2000, when you run a Microsoft Visual Basic for Applications macro that accesses the PageSetup object from the Document object or the Section object, you receive the following error message: Run time error '4605'. This command is not available. This problem can occur if all of the following conditions are true:
Your document contains a frame (not to be confused with an HTML frame or a frame page)
-and
The frame contains a table
-and
The frame is anchored to the first paragraph in the document
-and
You run a Visual Basic for Applications macro from Word, accessing the PageSetup object from the Document object or the Section objec
-------------------------------------------------
Unfortunately my case meets all these conditions. The same article says, that this problem is corrected in Word 2002. This is not true, because I'm having the same problem in Word 2002. In Word 2000 this bug did not cause any harm in my template, because changing the papersize did not have any effects to orientation.
Does anyone have solution or hint for this
Regards
E. Lehto
I have a problem with a document template. The orientation of my template is set to landscape. When users opens the template, the code will check the preferred papersize from users settings (I'm having my own configuration utility for templates to set all defaults like interface language, papersize etc.).
In previous Word version (97 and 2000) changing papersize had no effect to the page orientation but now in Word 2002 when I'm changing the size through code i.e. from European A4 to US Letter, Word also changes the orientation of the page from landscape to portrait! If I do the same thing manually from File/Page setup menu, orientation does not change
The next problem is, that I cannot change the orientation programmatically back to landscape, because there is a bug in Word. An article in knowledgebase says (http://support.microsoft.com/default.aspx?scid=kb;en-us;275966)
-----------------------------------------------
"In Microsoft Word 2000, when you run a Microsoft Visual Basic for Applications macro that accesses the PageSetup object from the Document object or the Section object, you receive the following error message: Run time error '4605'. This command is not available. This problem can occur if all of the following conditions are true:
Your document contains a frame (not to be confused with an HTML frame or a frame page)
-and
The frame contains a table
-and
The frame is anchored to the first paragraph in the document
-and
You run a Visual Basic for Applications macro from Word, accessing the PageSetup object from the Document object or the Section objec
-------------------------------------------------
Unfortunately my case meets all these conditions. The same article says, that this problem is corrected in Word 2002. This is not true, because I'm having the same problem in Word 2002. In Word 2000 this bug did not cause any harm in my template, because changing the papersize did not have any effects to orientation.
Does anyone have solution or hint for this
Regards
E. Lehto