[Openroad-users] Word ActiveX (again!) - External Class Events
Bodo Bergmann
Bodo.Bergmann at ingres.com
Tue Jul 8 20:36:30 EST 2008
The definition of the COM event shows 2 parameters, but you only
specified one of them.
In addition, the parameter names do not match - it has to be "doc"
rather than "doc_closing".
Try:
ON EXTCLASSEVENT 'DocumentBeforeClose' (doc = WinWord!Document DEFAULT
NULL, cancel = INTEGER NOT NULL)=
...
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Pete
Wilkinson
Sent: Tuesday, July 08, 2008 12:30 PM
To: International OpenROAD Users
Subject: Re: [Openroad-users] Word ActiveX (again!) - External Class
Events
thanks to Ian & Bodo for the same idea, whilst it does stop a new blank
document opening, due to doc_closing now being NULL, this parameter
really should have the closing document in it. I noticed my trace
message was actually reporting the name of the newly opened blank
document and not the one that was closing down ... the closing document
reference is obviously not coming back?
here is the Microsoft definition:
http://msdn.microsoft.com/en-us/library/aa263708(office.10).aspx
-----Original Message-----
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com]On Behalf Of Bodo Bergmann
Sent: 08 July 2008 11:20
To: International OpenROAD Users
Subject: Re: [Openroad-users] Word ActiveX (again!) - External
Class Events
Have you tried declaring the "doc_closing" parameter with
DEFAULT NULL?
________________________________
From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Pete
Wilkinson
Sent: Tuesday, July 08, 2008 11:53 AM
To: openroad-users at peerlessit.com
Subject: [Openroad-users] Word ActiveX (again!) - External Class
Events
I'm working in OR4.1 SP3, as External Class Events in OR2006 are
not working correctly, so whilst I wait for a fix ...
I want to know what document is closing, so I trap the external
class event as follows:
ON EXTCLASSEVENT 'DocumentBeforeClose' (doc_closing =
WinWord!Document)=
BEGIN
CurFrame.Trace ( text = 'closing:' + VARCHAR(doc_closing.Name)
);
END;
Now this works in the sense, in that it reports the document
name closing, however it seems the declaration in the parameter list of
'WinWord!Document' actually initiates a new document to be
opened/created ... not quite what I was expecting
is this a bug, and is there away around it? I've tried having
the parameter as type ExtClass but that was of no use.
**********************************************************************
SunGard Public Sector Limited, Marshfield, Chippenham, Wiltshire
SN14 8SR
Telephone: 08456 041999, Fax: 08456 052999
Registered Office: 33 St Mary Axe, London EC3A 8AA. Registered
in England No.
1593831 VAT Reg No. GB 810 9546 34
**********************************************************************
CONFIDENTIALITY: This e-mail (including any attachments) may
contain confidential, proprietary and privileged information, and is
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorized disclosure or use is prohibited.
If you received this e-mail in error, please notify the sender and
delete this e-mail from your system.
**********************************************************************
This message has been checked for all known viruses on behalf of
SunGard Public Sector by MessageLabs.
http://www.messagelabs.com or Email:
mailsweeper.info at vivista.sungard.com
For further information http://www.sungardps.co.uk
This message has been checked for all known viruses on behalf of
SunGard Public Sector by MessageLabs.
http://www.messagelabs.com or Email:
mailsweeper.info at vivista.sungard.com
For further information http://www.sungardps.co.uk
This message has been checked for all known viruses on behalf of SunGard
Public Sector by MessageLabs.
http://www.messagelabs.com or Email:
mailsweeper.info at vivista.sungard.com
For further information http://www.sungardps.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080708/540304de/attachment-0001.html
More information about the Openroad-users
mailing list