diff options
author | Behrend Cornelius <bc@openoffice.org> | 2002-09-02 11:06:12 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2002-09-02 11:06:12 +0000 |
commit | 17b23e68f3e75c9b9bd3b8964e688044f57770f1 (patch) | |
tree | 78362b72efdc501ca22458afd70a32ad75afa55a /wizards/source/template/Correspondence.xba | |
parent | 2f82ea11dcb4b6596a1e14e0a6db1f1b43cccd65 (diff) |
#96775# Errormessage in macro inserted
Diffstat (limited to 'wizards/source/template/Correspondence.xba')
-rw-r--r-- | wizards/source/template/Correspondence.xba | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/wizards/source/template/Correspondence.xba b/wizards/source/template/Correspondence.xba index 0f688cf46ea5..00380f96fd0a 100644 --- a/wizards/source/template/Correspondence.xba +++ b/wizards/source/template/Correspondence.xba @@ -63,7 +63,7 @@ Dim oAddressDialog as Object Dim oAddressPilot as Object Dim oFields as Object Dim oDocSettings as Object - + On Local Error Goto GENERALERROR bDBFields = DialogModel.Optmerge.State 'database or placeholder TemplateDialog.EndExecute() @@ -93,10 +93,10 @@ Dim oDocSettings as Object End If ParaBreak = com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK - oDocument = ThisComponent + oDocument = ThisComponent If bDBFields Then 'set the address db as current db at the document - oDocSettings = oDocument.createInstance("com.sun.star.document.Settings") + oDocSettings = oDocument.createInstance("com.sun.star.document.Settings") oDocSettings.CurrentDatabaseDataSource = sAddressbook oDocSettings.CurrentDatabaseCommand = Table oDocSettings.CurrentDatabaseCommandType = 0 @@ -111,7 +111,7 @@ Dim oDocSettings as Object oFoundall = oDocument.FindAll(oSearchDesc) 'Loop over the foundings - For i = oFoundAll.Count -1 To 0 Step -1 + For i = oFoundAll.Count -1 To 0 Step -1 oFound = oFoundAll.GetByIndex(i) sFoundString = oFound.String 'Extract the string inside the brackets @@ -149,6 +149,12 @@ Dim oDocSettings as Object aArgs(3).Value = Table oDisp.dispatch(aURL, aArgs()) End If + + GENERALERROR: + If Err <> 0 Then + Resume LETSGO + End If + LETSGO: End Sub |