OpenCores
URL https://opencores.org/ocsvn/aoocs/aoocs/trunk

Subversion Repositories aoocs

[/] [aoocs/] [trunk/] [doc/] [src/] [openoffice_macro.txt] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
REM  *****  BASIC  *****
2
 
3
Sub Main(srcUrl as String, destUrl as String, search as String, replaceUrl as String, doClose as Boolean)
4
Dim Doc As Object
5
Dim SearchDesc As Object
6
Dim Str As String
7
Dim Found As Object
8
Dim aOptions() As Object
9
 
10
Doc = StarDesktop.loadComponentFromURL(srcUrl, "_blank", 0, aOptions)
11
SearchDesc = Doc.createSearchDescriptor
12
 
13
 
14
SearchDesc.SearchString = search
15
 
16
Found = Doc.findFirst(SearchDesc)
17
 
18
Found.insertDocumentFromURL( replaceUrl, aOptions )
19
 
20
Doc.storeAsURL(destUrl, aOptions)
21
 
22
if(doClose) then
23
Doc.close(True)
24
endif
25
 
26
End Sub
27
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.