【发布时间】:2021-10-16 15:22:32
【问题描述】:
我在设置输出 word 文档的页面方向时遇到问题。我正在使用下面的代码,但它出现了一个错误,(无法将页面方向设置为横向)如果我注释掉 page_orientation 代码(下面)创建 word 文档,数据写入文档,一切正常除非显然不是需要的景观方向。为什么 page_orientation 不起作用?有解决办法吗?
PROCEDURE set_page_orientation( p_orientation IN VARCHAR2 )
Declare
PageSetup CLIENT_OLE2.OBJ_TYPE;
c_wdOrientPortrait CONSTANT NUMBER DEFAULT 0;
c_wdOrientLandscape CONSTANT NUMBER DEFAULT 1;
BEGIN
PageSetup := CLIENT_OLE2.GET_OBJ_PROPERTY( Selection, 'PageSetup' );
IF p_orientation = 'LANDSCAPE' THEN
CLIENT_OLE2.SET_PROPERTY( PageSetup, 'Orientation', c_wdOrientLandscape );
ELSE
CLIENT_OLE2.SET_PROPERTY( PageSetup, 'Orientation', c_wdOrientPortrait );
END IF;
END;
提前致谢。
【问题讨论】:
标签: oracle oracle10g ole oracleforms