URL
https://opencores.org/ocsvn/aoocs/aoocs/trunk
Subversion Repositories aoocs
[/] [aoocs/] [trunk/] [doc/] [src/] [openoffice_macro.txt] - Rev 2
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