- Toan Nguyen
- PowerBuilder
- Friday, 14 May 2021 07:17 PM UTC
Hi Everyone,
In my PB application (PB2017 R3), I created an OLEObject variable and connect to MS Word's OLE interface (word.application). I want to allow user to enter information in the .dotx template in MS Word. The template has no edit restrictions.
Below is a snippet of my codes:
ob = create nvuo_oletrap
result = ob.ConnectToNewObject("word.application")
if result <> 0 then
destroy ob
return -1
end if
result = ob.Documents.Add("form.dotx")
....
My application crashed when trying to call the Add().
The system returns error number 35 with the error message: "Error calling external object function 'add' at line 56..."
Does anyone have any idea or encountered this issue?
Thanks in advance for everyone's help!
Tony
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.