RE: Ole Automation with forte.
Tran,
Here is a piece of code(using Forte Version 3OF2 & Word 97) that we've
used to determine if there is already an instance of Word running:
// Create an instance of a Word Application and activate it.
// If an a Word application exists, just activate it.
if ( aTasks <> NIL and aTasks.Exists(aWordApplication.Name) )
then
aWordApplication.visible = TRUE;
aWordApplication.Activate();
else
aWordApplication = new();
aTasks = new();
aWordApplication.CreateUsingProgID( 'word.application'
aWordApplication.visible = TRUE;
aWordApplication.Activate();
aTasks is an attribute of type Tasks on our window & aWordApplication is
an attribute of type _Application on our window. This code will work if
there already is an instance of Word that was started from a Forte
applicaiton. It doesn't recognize a instance of Word that was started
outside of a Forte app. Hope this helps!!
From: Quy Tran[SMTP:[email protected]]
Sent: Wednesday, May 20, 1998 11:17 PM
To: [email protected]
Subject: Ole Automation with forte.
Good Day forte users,
I'm trying to invoke MSWord from a forte application.
I set the objectreference using CreateUsingProgId(This is the only way
that I could get it to work).
The problem is when using CreateUsingProgId, forte will create another
instance of Word. Is there a way to know if the instance already
exists
and retrieve the objectreference of that instance?
Any help would be appreciated.
Thanks
Quy Tran
Lumley Technology
Analyst/Programmer
[email protected]
Ph : 612 93186722
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive
<URL:http://pinehurst.sageit.com/listarchive/>
If you are not the intended recipient, please notify the Sender.
Non-business opinions may not reflect opinions of Piper Jaffray
Hi Aurang
You can call almost all methods using OLE. What is required is to know how to interpret a script to ABAP OLE call. This is explained in the tutorial<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a>
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>
Similar Messages
-
Ole Automation with forte.
Good Day forte users,
I'm trying to invoke MSWord from a forte application.
I set the objectreference using CreateUsingProgId(This is the only way
that I could get it to work).
The problem is when using CreateUsingProgId, forte will create another
instance of Word. Is there a way to know if the instance already exists
and retrieve the objectreference of that instance?
Any help would be appreciated.
Thanks
Quy Tran
Lumley Technology
Analyst/Programmer
[email protected]
Ph : 612 93186722
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Hi!
I am not sure that I can give you any "golden rules" for interfacing
with OLE, but I can give you some thoughts on where to look for problems
that can result in Segmentation Violations.
I have often seen segmentation violations arise as a result of a NIL
object. You might want to try turning on the trc:lo:25 trace flag to
see if there is a NIL object exception being raise right before the seg
v. You have to be careful with the trc:lo:25 flag, though, since it
will show you every exception, no matter what, that is raised within
Forte (even if it's been handled internally). This is of greater
significance to OLE projects, since Forte tries several different ways
of starting an OLE server and uses internally handled exceptions to
notify itself if a certain method failed.
Another thing to try is just-in-time debugging. You will need Microsoft
Visual C++ installed on the machine where the OLE code is running, and
you will need to set the FORTE_NOHANDLER environment variable to TRUE.
In the MSVC development environment, go to the Tools --> Options
properties sheet, and choose the Debug tab. On that tab, make sure that
Just-In-Time Debugging is selected. Then, run the application. When
you encounter the seg v, you should get a dialog box asking if you want
to debug the application. Choosing yes (actually, I think that pressing
Cancel does this - the dialog box tells you) will bring you into the
MSVC development environment, where you can try some intense debugging.
I hope this helps!
-Katie
[email protected] wrote:
>
Has anybody used Forte to communicate with external components using
OLE
Automation? We are creating segmentation violations through some of
our
use of this interface, and need to know if there are some 'golden
rules'
that can guide developers as they use the feature.
Thank you!--
Katie Carty
Forte Consulting
4801 Woodway Drive
Suite 300E
Houston, Texas 77056
vmail: 510-986-3802
email: [email protected]
----------------------------------------------- -
Automation with Forte 3 and Smalltalk
Hello,
I like to ask the following:
We want to develop an application in Forte. This application has to communicate with an developed application in Smalltalk. We want to use a mechanism called Automation (formerly called OLE Automation) for this.
We tried to set up the communication in the following way (according to the automation documentation):
-develop a little Smalltalk application
-make sure of the registration in the registry (progid, clsid and typelib)
-creation of a type library with ODL and the MIDL compiler
and a few other minor things.
In our Forte application we call the method of the Smalltalk application (we called it DisplayMessage). Forte makes the connection via the Registry and the library, starts the Smalltalk application and then ... nothing. It seems the Smalltalk application gets focus (window control), but nothing happens. In the windows task manager we can see that the Smalltalk application is started.
The method in the smalltalk application is simple: it needs an string as input. In the Forte application we give this string a value.
I hope this is clear and that you understand this problem.
Questions:
-why does the Smalltalk application start, but is not visible? It seems everything is configured correctly.
-what do we have to do to make it work?
-is it possible to give me any examples about this sort of Automation ?
I want to thank you in advance for the answers. Please send your answers to my e-mail address.
Greetings,
Hein Baan, Holland
IMPORTANT:
Due to problems with our mail server, you cannot reply
directly to this message. In order to reply, please send
your E-mail explicitly to [email protected]Hi Allen,
I would like to thank you very much for your help with Forte 3.0 and WTK 1.0.1 beta.
Thank you for the pointing me to the ForteJ2MEGuide.pdf file. It is very useful document.
However, even following it I did not succeeded in accomplishing my task.
I was able to follow the instructions and create, compile and run the Hello midlet which
was generated by the IDE. My previous problem related to the fact that I did not create
project and midlet suite for the midlet. After doing all of that the generated midlet worked. However, it was not what I wanted.
First, the instructions in the guide only described how to generate new midlet. I tried
to add the existing midlet to the current project. Unfortunately, the IDE always picked
up the generated template, not my code.
Second, when the generated midlet started to work, it was difficult to debug it. I set
up the breakpoint, but the IDE did not stop at it. I think the reason is the compiler
did not have debugging flag set up. Do you know where it is possible to set it up?
So, at the end I still cannot accomplish very simple task which should not be very
difficult at all:
1. Use my own code to create a midlet.
2. Compile and execute the midlet and see how it runs in emulator.
3. See step-by-step execution of every line of my code and the value
of every variable in the code.
Regards,
Jacob Nikom -
GPF and OLE Automation with Word6
Has anyone else had a problem with GPFs when trying to use Word6 as an OLE
Automation Server? Whenever our users try to open Word6 from the
application they get a GPF in QQKN.DLL at 000C:955C. What does the QQKN.DLL
do?
Any ideas?
- Scott Splavec - MIS 8
Business Analyst
Kirke-Van Orsdel, Inc.
1776 West Lakes Parkway
West Des Moines, IA 50398
(515) 248-6472
eMail: kvi!kvidm01![email protected]Hi Aurang
You can call almost all methods using OLE. What is required is to know how to interpret a script to ABAP OLE call. This is explained in the tutorial<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a>
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a> -
Hi All,
Does anyone know of any reference/help/material on how to use OLE automation to download and format data from ABAP to Excel.
I need to know what the available methods and properties are so I could format the data the way I want.
Any help will be greatly appreciated.
Regards.Hi Aurang
You can call almost all methods using OLE. What is required is to know how to interpret a script to ABAP OLE call. This is explained in the tutorial<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a>
Regards
*--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a> -
I had forms developped with forms 4.5
I did things like that :
-- open OLE object in Word
Forms_OLE.Activate_Server(wordItem);
application :=OLE2.CREATE_OBJ('Word.Basic');
Forms_OLE.Exec_Verb(wordItem, 1);
-- insert text in Word document
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, text);
OLE2.Invoke(application, 'Insert', args);
OLE2.Destroy_Arglist(args);
-- print document
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args, 0);
OLE2.Invoke(application, 'FilePrint', args);
OLE2.Destroy_Arglist(args);
-- exit Word
OLE2.Invoke(application, 'FileExit');
-- release server
if (Forms_OLE.Server_Active(item_id)) then
Forms_OLE.Close_Server(item_id);
end if;
With Form 6.0, Invoke method seems not to work anymore.
I suppose I have to use
Init_OleArgs(2);
Add_OleArg('insertText', VT_BSTR);
Add_OleArg('my text', VT_BSTR);
Call_Ole(itemName, ?);
Is it that and what should be the 2nd parameter of Call_Ole method ?
Thanks
Nico
nullWith Forte Release2 supporting only OLE callout, you can use DDE
to pass data; but with Release 3 which supports OLE callin , you
should be able to pass data both ways.
- Arvind
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arvind Kumar Krishnaswamy
Digital/Forte Software Products Group
Digital Equipment Corporation ______________________
1800,Harrison Street,Suite 1700, | | | | | | | |
Oakland.CA 94612 USA |d |i |g |i |t |a |l |
| | | | | | | |
Tel : 510-251-6537 ----------------------
Fax : 510-251-6531
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
Discoverer 3i through ole automation
Do you know,
where to find information about using ole automation with Discoverer 3i.<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by jr vasquez ([email protected]):
Also, is there a method of bypassing the authentication and passing arguments into Discoverer rather than having to login? If I am maintaining a userlist in another application can I not use that authentication method and pass that into Discoverer?<HR></BLOCKQUOTE>
For the Client server application, You can bypass login by passing parameters to the application. This is documented in the Discoverer User's Guide, Under Advanced Features, Using Command Line Options.
Discoverer Viewer and Discoverer Plus (java) also permit this through the urls used to launch the application. This is also documented.
Documentation for Discoverer OLE Automation may be found via Oracle Metalink. Type in 'Discoverer, OLE' in the search window and a technical bulletin, "Programmatic Control of Discoverer 3.1", will be returned. -
PICTURE MTHOD in OLE AUTOMATION
Hi,
Can anyone send me information for the "picture" method using OLE AUTOMATION for Excel Objects.
Thanks and Regards
AKhi
good
go through the following links i hope this will help you to solve your problem.
Re: OLE Automation with Excel
http://www.sap-img.com/abap/download-to-excel-with-format-border-color-cell-etc.htm
http://sap.ittoolbox.com/code/archives.asp?d=3027&a=s&i=10
thanks
mrutyun -
Reliability of Forte's OLE Automation Server
Hi Forte Users,
We are currently working on the feasibility of developing OLE interface
for our existing Forte services. In that process we are wondering about the
reliability these Forte OLE servers as compared to any other normal Forte
Servers. Has anyone have any experience of using them or any ideas about the
thing we need to concentrate before starting the development of these
servers.
Any input on this issue will be appreciated.
Thanks in advance,
Charu.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>A point worth mentioning here is about fail-over of service objects
that are configured as OLE automation servers.
If you are using Forte clients to talk to the service object,
then you really will not see any changes in automatic failover
situations.
However, in case of a non-Forte client( a.k.a. OLE client ), the
automatic failover does not happen. The non-Forte clients should be
coded to detect communication failures with the primary server. They
should have the intelligence to re-connect and retry methods on the (
new ) OLE server. This means you will have to program fail-over logic in
non-Forte clients, which you get for free with Forte clients.
I am not sure what kind of requirements is driving your process of
converting Forte services to OLE servers, but it is worth deliberating
on this problem, if you are not planning to use non-Forte clients, but
want to implement the services as OLE automation server.
Ofcourse you don't have to worry about this issue if you are not
planning to use non-Forte clients...
Good luck
Ajith Kallambella M.
Forte Consultant.
Please respond to Shi-Long Yin <[email protected]>
Subject: Re: Reliability of Forte's OLE Automation Server
Hi,
Essentially, I don't see any big differences between configuring and
exporting
the Forte service objects as normal Forte servers and DCE, Encina,
Tuxedo,
Object Broker, IIOP or OLE servers. We have already succeeded
configuring the
Forte servers as IIOP and OLE servers. Our Visual Basic client can
communicate
with the OLE server. The big difficulties are that there are two
limitations to
what elements of the service object€s class are available to an OLE
client.
First, an OLE client application can access any methods provided by that
service
object€s class, except for methods that use objects as parameters.
Second, OLE
clients can not access attributes of a Forte service object. OLE
clients can
only pass the following objects and data types as parameters and return
values:
TOOL data type Maps to OLE data type
Boolean Boolean
Cdispatch IDispatch
Cunknown IUnknown
Double Double
Float Float
Integer Long
i2 Iteger
string String
ui2 Short
ui4 Long
If a Forte service object includes methods that have object parameters
or return
values other than CUnknown and CDispatch, these methods are not included
as part
of the interface to this OLE server. Compared to the IIOP
configurations, the
limitations listed above may be too strict, especially, when you want to
export
your existing Forte services which may have interfaces with classes as
their
parameters or return types. But for IIOP, you can freely pass class
objects
(even deeply nested and derived) as method€s parameters or return
values. This
feature has significantly saved our development and maintenance time.
Other
alternatives may be to write the wrappers to overcome these limitations.
In one word, if you intend to integrate the EXISTING codes, which have
methods
with class parameters, you'd better to avoid configuring Forte service
objects
as OLE server. Try to use IIOP as much as you can because it is more
OOP
compatible and interoperable.
Shilong Yin
US West in Denver
=====================================================================
Charu wrote:
Hi Forte Users,
We are currently working on the feasibility of developing OLE interface
for our existing Forte services. In that process we are wondering about the
reliability these Forte OLE servers as compared to any other normal Forte
Servers. Has anyone have any experience of using them or any ideas about the
thing we need to concentrate before starting the development of these
servers.
Any input on this issue will be appreciated.
Thanks in advance,
Charu.
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
Get Your Private, Free Email at http://www.hotmail.com
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/> -
OLE Automation for Word. EditGoto with Word 97
I found a solution. Instead EditGoto, use WW7_EditGoto.
Example:
.- A Word Template whith two bookmarks
(Texto1, Tabla1). A normal bookmark
(Texto1) and a bookmark into a Word
Table (Tabla1).
In the Word Table, is posible change
cell o create a new row with the same
command (NextCell).
The word table has two columns an two
rows.
The first row is the Header.
The second row the first column contain
a bookmark (Tabla1).
.- A Form whit two blocks:
First block with two items:
nombre_doc
texto1
Secod Block (multirecord) whit two items
col1
col2
with a When-Button-Pressed:
DECLARE
application OLE2.OBJ_TYPE;
args OLE2.LIST_TYPE;
BEGIN
-- Start WordBasic and make Word visible
application:=OLE2.CREATE_OBJ('Word.Basic');
OLE2.INVOKE(application, 'AppShow');
-- Open a Word document
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,'Plantilla.dot');
OLE2.INVOKE(application, 'FileOpen', args);
OLE2.DESTROY_ARGLIST(args);
-- Put Text in the first bookmark
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,'Texto1');
OLE2.INVOKE(application, 'WW7_EditGoto', args);
OLE2.DESTROY_ARGLIST(args);
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,:Texto1);
OLE2.INVOKE(application, 'Insert', args);
OLE2.DESTROY_ARGLIST(args);
-- Send data from Multirecord Block to Word Table
GO_BLOCK('MULTI');
FIRST_RECORD;
IF :SYSTEM.RECORD_STATUS != 'NEW' THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,'Tabla1');
OLE2.INVOKE(application, 'WW7_EditGoto', args);
OLE2.DESTROY_ARGLIST(args);
LOOP
IF :col1 IS NOT NULL THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,:col1);
OLE2.INVOKE(application, 'Insert', args);
OLE2.DESTROY_ARGLIST(args);
END IF;
OLE2.INVOKE(application, 'NextCell');
IF :col2 IS NOT NULL THEN
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,:col2);
OLE2.INVOKE(application, 'Insert', args);
OLE2.DESTROY_ARGLIST(args);
END IF;
EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
NEXT_RECORD;
OLE2.INVOKE(application, 'NextCell');
END LOOP;
-- Save a Word document
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(args,:nombre_doc);
OLE2.INVOKE(application, 'FileSaveas', args);
OLE2.DESTROY_ARGLIST(args);
--Release the OLE object
OLE2.RELEASE_OBJ(application);
END;
Sorry by the sintax, but i don't speak English.
I hope it solves this problem.Hello,
I am also trying to use the OLE2 package for OLE Automation. But
difference being that I am not using Word but am using an
invisible control for Mail services, using the objects
MAPISession, MAPImessages. If anyone out there had already done
this do please give me a code snippet.
Thanx in advance
Anup Mistry,
Programmer/Analyst,
IIS,Inc
Vasile (guest) wrote:
: Hi Daniel,
: I used OLE with forms 5 ,but now it work without problems in
: forms 6, too.
: A procedure that save doc. look like that:
: procedure filesaveas (fname in varchar2) is
: arglist ole2.list_type;
: begin
: arglist := ole2.create_arglist;
: ole2.add_arg (arglist, fname);
: ole2.invoke (obj_hnd, 'filesaveas', arglist);
: ole2.destroy_arglist (arglist);
: end;
: I hope this help you.
: Vasile
: Daniel Fox (guest) wrote:
: : I am using Forms 6.0
: : Can anyone help with OLE automation using OLE2.
: : I can open Word, document stored in long raw, even insert
data
: : from other form field into the Word Document (only at the
: : beginning of the Document, though).
: : All the File commands, such as FileSaveAs, EditGoTo, etc..
: don't
: : work. They are simply ignored - no error messages, nothing.
: : Does anyone use Word Automation through Forms 6.0?
: : Please, HELP....
: : Thanks in advance,
: : Desperate Daniel.
null -
What commands can be performed with COM/OLE automation?
I believe I have posted this question before. Let's hope I have better luck this time.
Where are the "remote control" (those available through COM/OLE automation) commands documented?
I would be satisfied if at least I can find out how to perform the following command programmatically:
Document | OCR Text Recogniotion | Recognize Text Using OCR
Can that particular command be performed from a plugin perhaps?
TIA,
-Ramon> OCR is NOT available via COM - it is only exposed to plugins.
I suppose, however, that it is possible to write a plugin which is remote controlled from outside and performs the OCR phase?
-Ramon -
Auteur : Corinne Ribeyre-F085785 à _CARPO04
I need help with OLE Automation implementation (Excel,
CrystalReport,Word ...)
I generate Excel project with OleGen but no documentation exist for
this project. So I made severals tests (with Excel).
I can do (see examples):
- open a file
- open Excel Application
- open WorkBook, WoorkSheet
- Write and Read a Cell (but I am not sure it's the more efficient
method to do this)
- run a macro with parameters
But, I CAN'T do:
- run a command with parameters like PivotTableWizard (tableau croise
dynamique)
Does a Documentation exist about Forte project generated by Olegen
Tool (Excel..) ?
Does a Documentation exist about Forte/Crystal Report ?
Thank You for all answers and examples,
Corinne
Examples
-- Open Excel
theApplication : Excel . Application = New;
theApplication . CreateUsingProgID(NX('excel.application'));
--- Excel Visible /not visible
theApplication . Visible = VariantBoolean(Value = False);
-- Get all WorkBooks of Excel Application
theWorkBooks : Excel . WorkBooks = New;
theWorkBooks . SetDispatchObject(theApplication . Workbooks());
-- Open File.xls (added with previous Application)
theWorkBooks . Open (VariantString(Value = 'C:\\temp\\File.xls'));
-- Link file with a WorkBook
aWorkBook : Excel . WorkBook = New;
aWorkBook . SetDispatchObject(theApplication .
Workbooks(VariantString(value='File.xls')));
-- Link a Folder (Sheet1) from File with WorkSheet
aWorksheet : Excel . Worksheet = New;
aWorksheet . SetDispatchObject(aWorkBook .
Worksheets(VariantString(value='Sheet1')));
aRange : Excel . Range = New;
-- Fill Cell (1,1) with 'Article'
TitreArt : VariantString = VariantString(Value = 'Article');
aRange . SetDispatchObject(aWorksheet . Cells(VariantInteger(Value =
1), VariantInteger(Value = 1)));
aRange . Value = titreArt;
-- Fill Cell (1,2) with 'Date'
TitreDate : VariantString = VariantString(Value = 'Date');
aRange . SetDispatchObject(aWorksheet . Cells(VariantInteger(Value =
1), VariantInteger(Value = 2)));
aRange . Value = TitreDate;
-- Run a Macro
theApplication . Run(VariantString(Value = NX('MacroName')),
VariantInteger(Value = 65),
VariantInteger(Value = 7));
-- Page Setup
-- Link a Folder (Sheet2) from File with WorkSheet
aWorksheet . SetDispatchObject(aWorkBook .
Worksheets(VariantString(value='Sheet2')));
aPageSetup : Excel . PageSetUp = New;
aPageSetup . SetDispatchObject(aWorksheet.PageSetup);
aPageSetup . PrintTitleRows = VariantString (Value = '');
aPageSetup . PrintTitleColumns = VariantString (Value = '');
aPageSetup . LeftHeader = VariantString (Value = 'MICKEY');
aPageSetup . CenterHeader = VariantString (Value = 'MOUSE');
aPageSetup . RightHeader = VariantString (Value = '&J &H'); --
Attention J H en Excel Français; D T en Anglais
aPageSetup . LeftFooter = VariantString (Value = '');
aPageSetup . CenterFooter = VariantString (Value = 'DISNEYLAND
PARIS');
aPageSetup . RightFooter = VariantString (Value = '&P / &T');
aPageSetup . LeftMargin = VariantInteger(Value = 1);
aPageSetup . RightMargin = VariantInteger(Value = 1);
aPageSetup . TopMargin = VariantInteger(Value = 1);
aPageSetup . BottomMargin = VariantInteger(Value = 1);
aPageSetup . HeaderMargin = VariantDouble(Value = 0.5);
aPageSetup . FooterMargin = VariantDouble(Value = 0.5);
aPageSetup . PrintHeadings = VariantBoolean(Value = False);
aPageSetup . PrintGridlines = VariantBoolean(Value = False);
aPageSetup . PrintNotes = VariantBoolean(Value = False);
aPageSetup . CenterHorizontally = VariantBoolean(Value = True);
aPageSetup . CenterVertically = VariantBoolean(Value = True);
aPageSetup . Orientation = VariantInteger(Value = 2); --
(1:xlPortrait, 2:xlLandscape)
aPageSetup . Draft = VariantBoolean(Value = False);
aPageSetup . PaperSize = VariantInteger(Value = 9);
-- (8: xlPaperA3, 9: xlPaperA4)
aPageSetup . FirstPageNumber = VariantInteger(Value = -4105);
-- xlAutomatic
aPageSetup . Order = VariantInteger(Value = 1);
-- xlDownThenOver
aPageSetup . BlackAndWhite = VariantBoolean(Value = True);
aPageSetup . Zoom = VariantBoolean(Value = False);
aPageSetup . FitToPagesWide = VariantInteger(Value = 1);
aPageSetup . FitToPagesTall = VariantInteger(Value = 1);
-- Save File
aFilename : VariantString = VariantString(Value =
NX('C:/Temp/Essai.xls'));
aWorkBook . SaveAS(FileName = aFilename);
-- Print File
PrintOptions : PrintOptionsDesc;
PrintOptions = Self . Window . WindowSystem . DefaultPrintOptions .
Clone (Deep = True);
If (self.Window.PrintDialog (PrintOptions= PrintOptions,
ShowSetupDialog = TRUE,
ShowJobDialog = FALSE) = BV_OK) Then
aWorksheet . PrintOut();
End If;
-- Unlink
aWorkBook . RunAutoMacros(VariantInteger(Value = 2)); --xlAutoFermer
-- Cf doc VBA
aWorkBook . Close(variantboolean (Value = False));
TheApplication . Quit();
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>Hi all, forget this silly question...
I studied a little bit and learned how to handle OLEs properly...
Many thanks -
Venkat,
We have also had problems with OLE automation. In our case, we were trying
to open Lotus WordPro from our Forte Application. There are definitely
some issues with Forte releasing system resources, particularly if you are
working across tasks. In our case, one task was requesting a session which
then got started from another task. This meant that when we were finished,
Forte incorrectly kept the count of apps using the session > 0, and the
session never ended. I suspect if you check the task manager you will see
multiple sessions of Impromptu running. This quickly eats up memory, which
in turn leads to the less than gracious OLE_RESOURCE crash you describe.
Even after restricting all related calls to one task, the WordPro session
never goes away completely. We did manage to reconnect to any first
session started rather than eating up system resources with multiple
sessions.
Hope this helps.
Sioban Keane
NAC Re
We communicate between Forte and our Reporting tool, Impromptu, through
OLE.
Our clients run on all three Microsoft OS. Our version of Impromptu is 16
bit.
We notice this problem predominantly in Win 95 and 3.11, sometimes on NT
4.0. When we run a report in Impromptu that has considerable data (
~30-50k), Impromptu fails to respond to Forte. Forte thinks that it is not
started Impromptu yet. We have code in place to retry for 10 times before
giving up. Forte gives up after 10 times, even though Impromptu is up. The
next time we run this report on the same machine, without restarting, we
get
a OLE_RESOURCE exception from Forte, and the application crashes.
Has any one noticed this problem? Is there a way from Forte, to control OLE
resources?
Any help will be appreciated.
Venkat Kodumudi
Price Waterhouse LLP
Internet: [email protected]
Internet2: [email protected]Hi Joaquin,
For inserting many lines you should better use the OO technique instead of OLE. Check the help on Desktop Office Integration (e.g. for 4.6C):"
http://help.sap.com/saphelp_46c/helpdata/en/e9/0bee9f408e11d1893b0000e8323c4f/frameset.htm
Regards,
John. -
Calling 16 bit OLE server from Forte H2
All,
A Forte application loads and makes calls to a 16 bit OLE server. When the
Forte application terminates the 16 bit OLE server remains loaded and is
visible to the task manager.
It is surprising that the OLE automation server is visible after the
calling application has terminated and I have some questions:
1. Has anyone encountered this behaviour?
2. Does it cause problems?
3. Is there a known solution?
4. What is causing this behavior.?
The Forte application executes on a NT 4.0 client using Forte release H2.
The OLE automation server was written in VB. 4.0 and is a 16 bit solution.
Thanks for your help,
Eamonn.not sure if anyone is watching this thread anymore but i have this scenario. i am using the excel connection manager in SSIS to create an excel spreadsheet with VS 2012. To do this from what I have read I am required to use the 32-bit driver for "Microsoft
Access database engine 2007", if I use the 64-bit driver I cannot connect to the Excel connection manager. i get 0xc020801c message.
i can install the 32-bit "Microsoft Access database engine 2007" and resolve this problem. but i also have a stored procedure that creates a spreadsheet (i use this because i have to leave some cells intact), it appears to require the
64-bit "Microsoft Access database engine 2007". in 32-bit mode i get the following message
Msg 7438, Level 16, State 1, Procedure sp_CreateGRfile, Line 26
The 32-bit OLE DB provider "Microsoft.ACE.OLEDB.12.0" cannot be loaded in-process on a 64-bit SQL Server.
so i need both the 32-bit "Microsoft Access database engine 2007" and 64-bit "Microsoft Access database engine 2007".
any thoughts on getting around this issue? -
OLE Automation , date formatting
Hi everybody,
i have a problem with OLE automation for "date" formatting.
The cell value is correct ( DD/MM/YYYY) , but in some cases the cell option is "Date" ( this is the correct option ) and in other cases the cell option is "General". This last option is wrong because the value is left-justified, meanwhile the "Date" option is right-justified.
I wish to have the "Date" cell option always. (right-justified)
Is it possible to set this option with statement "SET PROPERTY OF..." ?
Thanks in advance.
Best regards.
Dario.Hi,
you can use this:
SET PROPERTY OF H_CELL 'NumberFormat' =
'dd\/mm\/yyyy'.
SET PROPERTY OF H_CELL 'Value' = '01/01/2012'.
Regards, Dieter
Maybe you are looking for
-
Hi, I am frequently having troubles with my MB. Different types of troubles. Couldn't solve a single one yet. I have performed reboot MB in safe mode-- hold down the left shift key after the start up tone till the spinning gear appeared. Few hours ba
-
TOMCAT problem on REDHAT 9,PLEASE HELP
Hello, i am new to redhat and i installed tomcat 4.0.1 and it worked properly, i used tomcat for studying issues so i used to start it and stop it many times now when i use mozilla and try to request the server using http://localhost:8080/ ,mozilla s
-
Why does Keynote crash on iOS7 on my iPad Mini?
I upgraded my iPhone 5 and iPad Mini to iOS7. On iPhone the keynote, pages and numbers work and the old files were there but on my iPad it didn't bring from iCloud anything.... Why? I cannot figure out how to get files from iCloud to my iPad and on
-
Replacement satellite for inspire 4.1 4400?
I've blown one of the satellite speakers on my 4.1 inspire 4400 system. I'm happy with it, and I'm not looking to upgrade. where can I buy just a replacement speaker for it by itself?also, on the sound card I have now has jack for a center channel sp
-
SAP Content Server error 405 Method Not Allowed
Hello Everyone We have installed SAP Content server 04s with SAP DB 7.6 build on Solaris platform. We are trying to connect it through ECC. We have configured Apache web server on content server, and we are able to access it through http url. On ECC