Mike Frank
2/2/2006 1:41:00 PM
Below find the code which works fine, though it will probably not help you. On your first post you
forgot to mention that you are dealing with an RTF file. In that constellation the test fails for me
too. If you open your RTF file manually in Word, you will see, that the page setup menu item is
disabled. So this is probably just not supported in Word.
#define.wdOrientPortrait(0)
#define.wdOrientLandscape(1)
COM wordApp, docs, doc, selection, pageSetup;
wordApp = new COM("Word.Application");
wordApp.visible(true);
docs = wordApp.Documents();
docs.Add();
doc = wordApp.ActiveDocument();
selection = wordApp.Selection();
selection.TypeText("Hallo Ballo");
pageSetup = doc.pageSetup();
pageSetup.orientation(#wdOrientLandscape);