URL
https://opencores.org/ocsvn/ao68000/ao68000/trunk
Subversion Repositories ao68000
[/] [ao68000/] [trunk/] [doc/] [src/] [openoffice_macro.txt] - Rev 12
Compare with Previous | Blame | View Log
REM ***** BASIC *****
Sub Main(srcUrl as String, destUrl as String, search as String, replaceUrl as String, doClose as Boolean)
Dim Doc As Object
Dim SearchDesc As Object
Dim Str As String
Dim Found As Object
Dim aOptions() As Object
Doc = StarDesktop.loadComponentFromURL(srcUrl, "_blank", 0, aOptions)
SearchDesc = Doc.createSearchDescriptor
SearchDesc.SearchString = search
Found = Doc.findFirst(SearchDesc)
Found.insertDocumentFromURL( replaceUrl, aOptions )
Doc.storeAsURL(destUrl, aOptions)
if(doClose) then
Doc.close(True)
endif
End Sub