From 17b23e68f3e75c9b9bd3b8964e688044f57770f1 Mon Sep 17 00:00:00 2001 From: Behrend Cornelius Date: Mon, 2 Sep 2002 11:06:12 +0000 Subject: [PATCH] #96775# Errormessage in macro inserted --- wizards/source/template/Correspondence.xba | 14 ++++++++++---- wizards/source/template/template.src | 6 +++--- 2 files changed, 13 insertions(+), 7 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 diff --git a/wizards/source/template/template.src b/wizards/source/template/template.src index 104c91f121da..69995b48d7c7 100644 --- a/wizards/source/template/template.src +++ b/wizards/source/template/template.src @@ -2,9 +2,9 @@ * * $RCSfile: template.src,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: rt $ $Date: 2001-08-24 05:52:40 $ + * last change: $Author: bc $ $Date: 2002-09-02 12:06:12 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -406,7 +406,7 @@ String CorrespondenceNoTextmark+1 String CorrespondenceMsgError { - Text = "Fehler"; + Text = "Es ist ein Fehler aufgetreten!"; Text[English] = "Error"; Text[ english_us ] = "Error"; Text[ portuguese ] = "Erro";