-----------------------------------------------------------------------------------------------------------
Which version of OpenOffice.org are you using? not using yet. Depends on these answer.
What Operating System (version) are you using? Windos XP
What is your question or comment?
Beyond of the natural use of Microsoft Office parts (Word, Excel...) we use instantiate them via OLE, to operate its facilities from inside others softwares. Our development is based on VisualFoxPro 9 and we frequently use this fact.
Considering the fondation Class "Word" registered in Windows we can do:
om=CREATEOBJECT([word.application])
IF TYPE([om])#[O]
MESSAGEBOX([WORD not Opened],16,[Error])
return
ENDIF
om.documents.open([..\docs\trans.doc])
om.visible=.t.
WITH om.ActiveDocument.Bookmarks
.Item([cliente]).Select
om.Selection.InsertAfter(clientes.nome)
.Item([endereco]).Select
om.Selection.InsertAfter(clientes.endereco)
.Item([bairro]).Select
om.Selection.InsertAfter(clientes.bairro)
.Item([cidade]).Select
om.Selection.InsertAfter(clientes.cidade)
.Item([uf]).Select
om.Selection.InsertAfter(clientes.estado)
.Item([telefone]).Select
om.Selection.InsertAfter(clientes.telefone)
.Item([nf]).Select
om.Selection.InsertAfter(notafiscal.nf)
.Item([quantidade]).Select
om.Selection.InsertAfter(notafiscal.quantidade)
.Item([caixas]).Select
om.Selection.InsertAfter(notafiscal.especie)
.Item([transport]).Select
om.Selection.InsertAfter(notafiscal.tnome)
ENDWITH
MESSAGEBOX([Imprima o TRANS e Click OK.],64,[NF])
om.quit
This works fine and the question we have is: Could we do something like this above with OpenOffice? How ?
If we could, many costumers wold migrate to OpenOffice.
Thanks
(sorry for my English)
