Need to be able to access/update Mail Merge Fields in a Writer document where the is no form.
I am trying to modify a simple Basic Macro, we use for opening forms with Filtered info, but I get stuck on the form issue.
Code: Select all
REM ***** BASIC *****
Const cDoc = "!fUpdateProjectInfo"
Const cForm = "fProjectNumber"
Const cHere = "FKProjectNumberID"
Const cThere = "ProjectNumber"
sub fUpdateProjectInfo(ev)
GlobalScope.BasicLibraries.loadLibrary("Tools")
sPath = DirectoryNameoutofPath(ThisComponent.URL, "/")
sPath = sPath &"/"& cDoc &".odt"
thisForm = ev.Source.Model.Parent
i = thisForm.findColumn(cHere)
var = thisForm.getString(i)
doc = StarDesktop.loadComponentFromURL(sPath, "_default", 0, Array())
form = doc.DrawPage.Forms.getByName(cForm)
form.Filter = ""& cThere &" = "& var &""
form.reload()
End SubNow I am trying to use a modified version of this macro where there is no cForm.
Using the Mail Merge function on a pre-formatted background in Writer, the ResultSet of Queries are easily placed. The forms are always forwarded in pdf-format.
When creating these type of forms, there are no forms needed. Using the 'Form Navigator' no forms are shown.
Now my question is how use access/update cThere if there are no forms.
Any suggestions are highly appreciated.
Dream