Thanks for the link. I suspected it wouldn't be as simple as .pageformat=.pageformat.
Based on the link I now have a working process. For folks who follow on its important to have .papersize before .orientation (as in the example) because setting the paper size resets orientation to portrait.
Quote:
You may be able to avoid needing separate sections by using one or more StyleRef fields.
|
Stylerefs would have made the heading content easier to automate but doesn't solve the problem as some of the chapters have portrait and landscape sections with the landscape sections usually being at the end of the chapter.
I gave up on using stylerefs in headers because they don't respect the outline level as a boundary for the search. e.g. if I use a styleref in the header for Heading 2 and there is no Heading 2 before the previous Heading 1 then you get a Heading 2 reference from the previous chapter rather than a null result.
We found this out when using the following stylrefs in the header
{styleref "Heading 1" \n} {Styleref "Heading 1"}
{styleref "Heading 2" \n} {Styleref "Heading 2"}
and found we were getting stuff like
3.2.P.3 Manufacture
3.2.P.2.6 Compatibility
Now - does anyone have any input on why I get a standard dialog box for an error rather than my MsgBox for the 4605 error