VBA Script: E-Mail automatisch in Kontakte-Ordner übernehmen?
Ich habe für Outlook 2007 in "Diese Outlook-Sitzung" ein kleines Script eingegeben, das bei Antwort auf eine Nachricht die E-Mail-Adresse automatisch in den Kontakte-Ordner übernimmt.
Das funktioniert soweit auch gut, allerdings wird die E-Mail-Adresse jeweils in Anführungszeichen gesetzt.
Wie kriege ich diese wieder weg?
Es würde vermutlich zu weit führen, hier as Script zu posten, aber ich vermute den "Fehler" in dieser Sequenz:
For Each objRecip In objMail.Recipients
' check to see if the recip is already in Contacts
strAddress = AddQuote(objRecip.Address)
For i = 1 To 3
strFind = "[Email" & i & "Address] = " & _
strAddress
Set objContact = colContacts.Find(strFind)
If Not objContact Is Nothing Then
Exit For
End If
Next
' if not, add it
Würde es funktionieren, wenn ich bei strFind die Anführungszeichen weglasse?
-
Die Sache hat sich gewissermaßen selbst aufgeklärt.
Im Script gibt es die Passage:
' helper function - put in any module Function AddQuote(MyText) As String AddQuote = Chr(34) & MyText & Chr(34) End FunctionDa habe ich einfach
AddQuote = MyTextgesetzt.