473,687 Members | 3,447 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FRM 40735:WHEN-BUTTON-PRESSED Trigger Raised unhandled Exception ORA - 305500

2 New Member

I try to open new OpenOffice document (writer),
But I am getting the exception
FRM 40735:WHEN-BUTTON-PRESSED Trigger Raised unhandled Exception ORA - 305500

Please help me to resolve this exception.

my code is as follows in when-button-pressed trigger:


App ole2.obj_type;
oDocument ole2.obj_type;
oDesktop ole2.obj_type;
args1 ole2.list_type;
args2 ole2.list_type;
Args ole2.list_type;


App := ole2.create_obj ('com.sun.star. ServiceManager' );
OLE2.ADD_ARG(ar gs1,'com.sun.st ar.frame.Deskto p');
oDesktop := OLE2.INVOKE_OBJ (App,'createIns tance',args1);

OLE2.ADD_ARG(ar gs2,'private:fa ctory/swriter');
OLE2.ADD_ARG(ar gs2,'_blank');
OLE2.ADD_ARG(ar gs2,'0');
OLE2.ADD_ARG(ar gs2,Args);

oDocument := OLE2.INVOKE_OBJ (oDesktop,'load ComponentFromUR L',args2);

I am running this on winXP and form v 6i, OpenOffice 2.2.
Jul 18 '07 #1
1 17779
2 New Member
I can start Writer using VB Script like this:

'The service manager is always the starting point
'If there is no office running then an office is started up
Set objServiceManag er= WScript.CreateO bject("com.sun. star.ServiceMan ager")
'Create the Desktop
Set objDesktop= objServiceManag er.createInstan ce("com.sun.sta r.frame.Desktop ")
'Open a new empty writer document
Dim args()
Set objDocument= objDesktop.load ComponentFromUR L("private:fact ory/swriter",_
"_blank", 0, args)
'Create a text object
Set objText= objDocument.get Text
'Create a cursor object
Set objCursor= objText.createT extCursor
'Inserting some Text
objText.insertS tring objCursor, "The first line in the newly created text document."&_
vbLf, false

and I can start MS Word, MS Excel using:

selection OLE2.OBJ_TYPE;
-- create a new document
app := OLE2.CREATE_OBJ ('Word.Applicat ion');
OLE2.SET_PROPER TY(app,'Visible ',1);
docs := OLE2.GET_OBJ_PR OPERTY(app, 'Documents');
doc := OLE2.INVOKE_OBJ (docs, 'add');
selection := OLE2.GET_OBJ_PR OPERTY(app, 'Selection');
-- insert data into new document from long item
OLE2.SET_PROPER TY(selection, 'Text', :POLE_TEKSTOWE5 );
-- save document as example.doc
OLE2.ADD_ARG(ar gs, 'd:\example.doc ');
OLE2.INVOKE(doc , 'SaveAs', args);
-- close example.doc
OLE2.ADD_ARG(ar gs, 0);
OLE2.INVOKE(doc , 'Close', args);
OLE2.RELEASE_OB J(selection);
-- exit MSWord
OLE2.INVOKE(app ,'Quit');

But I can't start Writer from Forms :(
Jul 19 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Tommy DN | last post by:
I'm working with Oracle Form Builder and I needed a trigger to check something when I delete a record. I made a trigger on ' KEY-DELREC ' and I've written this code ( it's just a test, the delete statement isn't ready ): ---- DECLARE aantal number(8); BEGIN select count(*)
by: RalphTheExpert | last post by:
I'm getting different behavior if my code is running under the debugger or not. I have modified Winmain to look like this: // Copyright (C) 2002 Microsoft Corporation // All rights reserved. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER // EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
by: Lucvdv | last post by:
Can someone explain why this code pops up a messagebox saying the ThreadAbortException wasn't handled? The first exception is reported only in the debug pane, as expected. The second (caused by thread.Abort()) is reported twice: once in the debug window, and once through the message box. Is it because the thread was sleeping when the exception occurred?
by: Simon Tamman {Uchiha Jax} | last post by:
Now this is bugging me. I just released software for a client and they have reported an unhandled stack overflow exception. My first concern is that the entirity of the UI and any threaded operations are all within Try Catches to help me locate the problem and the origination of any problem by specifiying an error code in the "Catch" section. So theoretically this shouldn't have been possible (at which point we all say "yeah,...
by: Bob | last post by:
In Vs 2005 you have new applicationsEvents.vb I was testing it in a simple app and found that it was easier to implement unhandled exception management tah it was in Vs2003 (vb.net) You can, if you want to, prevent your app from terminating on an unhandled exception, and for me this is important. In an Ivr app it will let me hang up the phone only on the line that triggered the unhandled exception, leaving other callers to complete their...
by: R.A.M. | last post by:
Hello, I have written simple ASP.NET application but during execution I got unhandled exception. I have checked (debugging): it is not raised in my code, it uccurs after Page_Unload. Here's description: Message: Exception of type 'System.Web.HttpUnhandledException' was thrown. Stack: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean
by: Tim Zych | last post by:
What factor would allow an unhandled exception to occur in a compiled project, versus no error for the same action during development? In other words, I have a project that, in development when I test it, runs no problem. When I compile and release the dll, the user gets an unhandled exception. It doesn't halt the code, it just shows an error dialog...click continue and it continues. Is there some setting I must set so that I can see...
by: Frank Millman | last post by:
Hi all I am doing something which works, but I have a gut feel that it cannot be relied upon. Can someone confirm this one way or the other. I have a multi-threaded server, which responds to client logins and sets up a thread for each active session. A thread can stay active for a long time. I use a subclass of threading.Thread to handle the session, to which I
by: =?Utf-8?B?c3VydHVyeg==?= | last post by:
Hi, I feel like a noob for asking this. When I publish a VB windows application, I want to disable the ability of the the user to continue when there is an unhandled exception. For example, if there is a bug in the program that causes an exception, I want the program to crash. If there is an unhandled exception the program is in an undefined state, and continuing could be dangerous. I'm surprised the
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.