I'm having problems setting the page orientation of the output word document. I'm using the below code but it's coming up with an error, (unable to set page orientation to LANDSCAPE) if I comment out the page_orientation code (below) the word document is created, data is written to the document, everything works fine except obviously not in the LANDSCAPE orientation that is needed. Why isn't page_orientation working? Is there a work around?
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;
thanks in advance.
Unless I'm wrong,