You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Clarence GUO <cl...@gmail.com> on 2013/09/02 08:47:46 UTC

A question about StarBasic

Hi~
I'm totally green at StarBasic and VBA. Now I have a question about
CreateObject. I installed SAP and have below macros.

Dim SapGuiAuto As Variant
Set SapGuiAuto = CreateObject("SAPGUI")

But I got error "BASIC runtime error. '91' Module cannot be loaded; invalid
format" when executing CreateObject("SAPGUI")
Then I debugged code then found all SbxFactory instances creation failed. I
found below SbxFactory instances but don't know clearly what are they.
SbiFactory, seems it's for create pure StarBasic objects
SbTypeFactory, seems it's for create user defined objects
SbClassFactory, seems it's for create user defined classes
SbOLEFactory, seems it's for create OLE objects
SbFormFactory, is it for create form controls?
SbUnoFactory, seems it's for create UNO structs

In my scenario, which instance should work? Is that SbTypeFactory or
SbClassFactory? But why they don't work? Is that because StarBasic only
support some predefined objects? Or I lost something? How can I enable the
support for SAP objects?
Could anybody teach me?

Thanks
Clarence

Re: A question about StarBasic

Posted by Fernando Cassia <fc...@gmail.com>.
On Mon, Sep 2, 2013 at 2:47 AM, Clarence GUO <cl...@gmail.com>wrote:

> I'm totally green at StarBasic and VBA


I suggest you read this. Since StarOffice was OpenOffice.org -w some
addons- which is now AOO, it is totally relevant.

http://toolkit.its.isu.edu/Documentation/StarOffice/StarOffice_Basic_Guide_en-US.PDF

You will understand then that StarBasic -or OpenOffice Basic- is NOT VBA,
and that things aren't a "drop-in" replacement. Similar, yes. For instance,
VBA is Windows-Only and hence can interface to Windows-only services, while
StarBasic/OOBasic is, like Open Office,needs to run on multiple platforms.

FC


-- 
During times of Universal Deceit, telling the truth becomes a revolutionary
act
Durante épocas de Engaño Universal, decir la verdad se convierte en un Acto
Revolucionario
- George Orwell

Re: A question about StarBasic

Posted by Andrew Douglas Pitonyak <an...@pitonyak.org>.
Clarence, I assume that Jürgen was referring to objects that are part of 
AOO.

In the example provided by Peter, creating an Excel.Sheet references an 
object that is not part of AOO, but it is known to Windows (if it works) 
and so AOO is able to find it.

While you are running AOO, the objects that are known are sometimes 
context dependent. You can always access an object that knows how to 
perform Simple File Access

http://www.openoffice.org/api/docs/common/ref/com/sun/star/ucb/SimpleFileAccess.html

A Text Table, however, must be created by a document and is then 
inserted into the document that created it.

http://www.openoffice.org/api/docs/common/ref/com/sun/star/text/TextTable.html

Just heard a crash followed by a crying child, need to run

On 09/03/2013 01:21 AM, Clarence GUO wrote:
> Juergen,
> Yes SAPGUI is not an AOO default object, it should be a SAP COMM object. Do
> you mean OpenOffice Basic doesn't support non-default objects? If so, what
> are the OpenOffice Basic default objects?
>
> Clarence
>
>
> 2013/9/2 Jürgen Schmidt <jo...@gmail.com>
>
>> On 9/2/13 11:09 AM, Clarence GUO wrote:
>>> Thanks Peter,
>>> Yes Set SapGuiAuto = CreateObject("Excel.Sheet") works.
>>> Why "SAPGUI" must be an ActiveXObject? Is it by design?
>>>
>> whatever it is in detail it is not part of AOO by default and probably
>> comes from somewhere else.
>>
>> Juergen

-- 
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info:  http://www.pitonyak.org/oo.php


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: A question about StarBasic

Posted by Clarence GUO <cl...@gmail.com>.
Juergen,
Yes SAPGUI is not an AOO default object, it should be a SAP COMM object. Do
you mean OpenOffice Basic doesn't support non-default objects? If so, what
are the OpenOffice Basic default objects?

Clarence


2013/9/2 Jürgen Schmidt <jo...@gmail.com>

> On 9/2/13 11:09 AM, Clarence GUO wrote:
> > Thanks Peter,
> > Yes Set SapGuiAuto = CreateObject("Excel.Sheet") works.
> > Why "SAPGUI" must be an ActiveXObject? Is it by design?
> >
>
> whatever it is in detail it is not part of AOO by default and probably
> comes from somewhere else.
>
> Juergen
>
>
> > Clarence
> >
> >
> > 2013/9/2 Peter Eberlein <pe...@refofd.verwalt-berlin.de>
> >
> >>
> >> Hi Clarence,
> >> Am 02.09.2013 08:47, schrieb Clarence GUO:
> >>
> >>  Hi~
> >>> I'm totally green at StarBasic and VBA. Now I have a question about
> >>> CreateObject. I installed SAP and have below macros.
> >>>
> >>> Dim SapGuiAuto As Variant
> >>> Set SapGuiAuto = CreateObject("SAPGUI")
> >>>
> >>>  "SAPGUI" must be an ActiveXObject.
> >>
> >> Does Set SapGuiAuto = CreateObject("Excel.Sheet") work?
> >>
> >> Regards Peter
> >>
> >>
> >>
> ------------------------------**------------------------------**---------
> >> To unsubscribe, e-mail: dev-unsubscribe@openoffice.**apache.org<
> dev-unsubscribe@openoffice.apache.org>
> >> For additional commands, e-mail: dev-help@openoffice.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>

Re: A question about StarBasic

Posted by Jürgen Schmidt <jo...@gmail.com>.
On 9/2/13 11:09 AM, Clarence GUO wrote:
> Thanks Peter,
> Yes Set SapGuiAuto = CreateObject("Excel.Sheet") works.
> Why "SAPGUI" must be an ActiveXObject? Is it by design?
> 

whatever it is in detail it is not part of AOO by default and probably
comes from somewhere else.

Juergen


> Clarence
> 
> 
> 2013/9/2 Peter Eberlein <pe...@refofd.verwalt-berlin.de>
> 
>>
>> Hi Clarence,
>> Am 02.09.2013 08:47, schrieb Clarence GUO:
>>
>>  Hi~
>>> I'm totally green at StarBasic and VBA. Now I have a question about
>>> CreateObject. I installed SAP and have below macros.
>>>
>>> Dim SapGuiAuto As Variant
>>> Set SapGuiAuto = CreateObject("SAPGUI")
>>>
>>>  "SAPGUI" must be an ActiveXObject.
>>
>> Does Set SapGuiAuto = CreateObject("Excel.Sheet") work?
>>
>> Regards Peter
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.**apache.org<de...@openoffice.apache.org>
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: A question about StarBasic

Posted by Clarence GUO <cl...@gmail.com>.
Thanks Peter,
Yes Set SapGuiAuto = CreateObject("Excel.Sheet") works.
Why "SAPGUI" must be an ActiveXObject? Is it by design?

Clarence


2013/9/2 Peter Eberlein <pe...@refofd.verwalt-berlin.de>

>
> Hi Clarence,
> Am 02.09.2013 08:47, schrieb Clarence GUO:
>
>  Hi~
>> I'm totally green at StarBasic and VBA. Now I have a question about
>> CreateObject. I installed SAP and have below macros.
>>
>> Dim SapGuiAuto As Variant
>> Set SapGuiAuto = CreateObject("SAPGUI")
>>
>>  "SAPGUI" must be an ActiveXObject.
>
> Does Set SapGuiAuto = CreateObject("Excel.Sheet") work?
>
> Regards Peter
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.**apache.org<de...@openoffice.apache.org>
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>

Re: A question about StarBasic

Posted by Fernand Vanrie <so...@pmgroup.be>.
Hallo Peter ,
>
> Hi Clarence,
> Am 02.09.2013 08:47, schrieb Clarence GUO:
>> Hi~
>> I'm totally green at StarBasic and VBA. Now I have a question about
>> CreateObject. I installed SAP and have below macros.
>>
>> Dim SapGuiAuto As Variant
>> Set SapGuiAuto = CreateObject("SAPGUI")
>>
> "SAPGUI" must be an ActiveXObject.
BTW how do you check if "SAPGUI" is an ActiveXObject with Windows ?

Greetz

Fernand
> Does Set SapGuiAuto = CreateObject("Excel.Sheet") work?
>
> Regards Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: A question about StarBasic

Posted by Peter Eberlein <pe...@refofd.verwalt-berlin.de>.
Hi Clarence,
Am 02.09.2013 08:47, schrieb Clarence GUO:
> Hi~
> I'm totally green at StarBasic and VBA. Now I have a question about
> CreateObject. I installed SAP and have below macros.
>
> Dim SapGuiAuto As Variant
> Set SapGuiAuto = CreateObject("SAPGUI")
>
"SAPGUI" must be an ActiveXObject.

Does Set SapGuiAuto = CreateObject("Excel.Sheet") work?

Regards Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org