-
Alex Rodrigues
- PowerBuilder
- Saturday, 21 June 2025 03:09 PM UTC
We are experiencing a problem when trying to print a document in landscape mode using the OLE control TIS.TX.TextControl, tested with both versions 13 and 15, inside a PowerBuilder application (version 2019 R3 Build 2728).
The PowerBuilder Object Browser lists the PageOrientation property for version 15 of TIS.TX.TextControl. However, when we try to assign 2 to this property (to indicate landscape), we get a runtime error:
PowerBuilder Error 36
Message: Name not found accessing external object property pageorientation at line 31
Object: u_nv_monta_laudo
Function: of_txcontrol_montar_texto
Sample code:
i_uo_ole_tx.ConnectToNewObject("TIS.TX.TextControl.15")
IF p_rte.pageorientation = PaperLandscape! THEN
i_objTX.PageOrientation = 2
END IF
Even though the OLE object connects successfully:
ole.ConnectToNewObject("TIS.TX.TextControl.15")
The PageOrientation property seems inaccessible at runtime, despite appearing in the PowerBuilder browser.
We kindly ask for your support:
- Is there an official way to set landscape printing using TIS.TX.TextControl within PowerBuilder?
- Is the PageOrientation property supposed to work in version 15 via OLE Automation?
- Are there any recommended workarounds for this?
We appreciate your help and look forward to your guidance on this matter.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.