OLE专业户,如何设置word页面为横向
看了妖哥以前的帖子如下:
String strDocFile( "C:\\ccrun\\123.doc "); Variant vWordApp = Variant::CreateObject( "Word.Application "); vWordApp.OlePropertySet( "Visible ", true); vWordApp.OlePropertyGet( "Documents "). OleFunction( "Open ", strDocFile.c_str()); // 页面设置成横向 vWordApp.OlePropertyGet( "ActiveDocument ") .OlePropertyGet( "PageSetup ") .OlePropertySet( "Orientation ", 1); // wdOrientLandscape // 另外,设置成纵向时,将Orientation置为0即可。
Variant vWordApp = Variant::CreateObject("Word.Application"); vWordApp.OlePropertySet("Visible", true); vWordApp.OlePropertyGet("Documents").OleFunction("Add"); vWordApp.OlePropertyGet("ActiveDocument").OlePropertyGet("PageSetup") .OlePropertySet("Orientation",1); // wdOrientLandscape