Hi Albert,

do I understand correctly: you want to execute a macro when you load an
rtf file? Then why do you put the macro into a template? OOo will
execute macros when a document is loaded only from the document itself,
from the installed macro libraries or from the user macros. Everything
else doesn't make sense, if you think it to the end.

If you don't want to do that, perhaps you can load your template and
insert the rtf file into it using
com.sun.star.document.XDocumentInsertable (you will need a cursor to get
this interface).

Regards,
Mathias

Albert Arnau wrote:

> Hello
> 
> It works... i was passing "4" instead of 4 in the property value.
> Know i've got more problems.
> I've got my doc stored in the BBDD in Rtf format and i need to load it with
> Open Office and with Macros.
> I've the template (template.ott) with macros but i dont't know how to create
> a document across the template and with the rtf text.
> 
> thanks
> 
> Salutacions,
>  
> Albert Arnau
> Director Tècnic
> Valen Computer
>  
> Ctra. Valls (Urb. Sant Salvador)
> C/Poeta Mistral, 2 - 43130 - Tarragona
> Tel (34) 977 52 30 02 - Fax (34) 977 52 30 05
> e-mail: [email protected]
> www.valen.es
> 
> -----Mensaje original-----
> De: [email protected] [mailto:[email protected]] 
> Enviado el: martes, 26 de mayo de 2009 11:47
> Para: [email protected]
> Asunto: Re: [dev] Using Macros
> 
> Hi Albert,
> 
> That sounds strange. A simple OOo basic test shows that there is no 
> problem with loading of a template using API calls you have used ( with 
> correct property name and value 4 ), the macros are executable afterwards.
> 
> Just to be sure that the macro execution mode is the problem, can you 
> execute the macros in "Tools/Macros/Organize Macros/OpenOffice basic..." 
> dialog?
> 
> Best regards,
> Mikhail.
> 
> On 05/26/09 08:33, Albert Arnau wrote:
>> I know but it doesn't work either.
>>
>> Salutacions,
>>  
>> Albert Arnau
>> Director Tècnic
>> Valen Computer
>>  
>> Ctra. Valls (Urb. Sant Salvador)
>> C/Poeta Mistral, 2 - 43130 - Tarragona
>> Tel (34) 977 52 30 02 - Fax (34) 977 52 30 05
>> e-mail: [email protected]
>> www.valen.es
>>
>> -----Mensaje original-----
>> De: Mathias Bauer [mailto:[email protected]] 
>> Enviado el: lunes, 25 de mayo de 2009 22:58
>> Para: [email protected]
>> Asunto: Re: [dev] Using Macros
>>
>> Hi,
>>
>> I think Mikhail wanted to point out that the name should be
>> "MacroExecutionMode", not "MacroExecMode".
>>
>> Regards,
>> Mathias
>>
>> Albert Arnau wrote:
>>
>>   
>>> Hi 
>>>
>>> I've use it with value "4" and it doesn`t work.
>>>
>>> Salutacions,
>>>  
>>> Albert Arnau
>>> Director Tècnic
>>> Valen Computer
>>>  
>>> Ctra. Valls (Urb. Sant Salvador)
>>> C/Poeta Mistral, 2 - 43130 - Tarragona
>>> Tel (34) 977 52 30 02 - Fax (34) 977 52 30 05
>>> e-mail: [email protected]
>>> www.valen.es
>>>
>>> -----Mensaje original-----
>>> De: [email protected] [mailto:[email protected]] 
>>> Enviado el: lunes, 25 de mayo de 2009 15:43
>>> Para: [email protected]
>>> Asunto: Re: [dev] Using Macros
>>>
>>> Hi Albert,
>>>
>>> Please use "MacroExecutionMode" as argument name.
>>>
>>> Best regards,
>>> Mikhail.
>>>
>>> On 05/22/09 10:00, Albert Arnau wrote:
>>>     
>>>> Hi everybody,
>>>>
>>>>  
>>>>
>>>> I've a "little" problem with the macros in OpenOffice.
>>>>
>>>> I've a template where I have developed macros inside, when i open this 
>>>> template the macros as executed correctly.
>>>>
>>>> The problem is when i open that template in my application (in visual 
>>>> basic) the macros are no executed, i don't know why. Here is the code 
>>>> that I use
>>>>
>>>>  
>>>>
>>>> *Set oDesk = CreateUnoService("com.sun.star.frame.Desktop")*
>>>>
>>>> *Set oParam(0) = MakePropertyValue("MacroExecMode", 4)*
>>>>
>>>> *Set oDoc = oDesk.loadComponentFromURL(ConvertToUrl(SelDoc), "_blank", 
>>>> 0, oParam())*
>>>>
>>>>  
>>>>
>>>> I also attack the template
>>>>
>>>>  
>>>>
>>>> Any help? thanks
>>>>
>>>> Salutacions,
>>>>
>>>>  
>>>>
>>>> Albert Arnau
>>>>
>>>> Director Tècnic
>>>>
>>>> Valen Computer
>>>>
>>>>  
>>>>
>>>> Ctra. Valls (Urb. Sant Salvador)
>>>>
>>>> C/Poeta Mistral, 2 - 43130 - Tarragona
>>>>
>>>> Tel (34) 977 52 30 02 - Fax (34) 977 52 30 05
>>>>
>>>> e-mail: [email protected] <mailto:[email protected]>
>>>>
>>>> www.valen.es <http://www.valen.es>
>>>>
>>>>  
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>   
>>>>       
>>>     
>>
>>
>>   
> 
> 


-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[email protected]".
I use it for the OOo lists and only rarely read other mails sent to it.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to