Hallo,
in unserer Kundendatenbank gibt es im Kontaktformular ein Feld mit der eMailadresse. Ich habe irgendwann den Text vor dem Feld als Hotspot Verknüpfung mit der Formel:
belegt. Hat zwar funktioniert, aber keiner hat es benutzt/gewusst.
Nun wollte ich selbiges mit einem Button machen, allerdings passiert da nichts mehr wenn ich darauf klicke.
Habe mal ein wenig im Persönlichen Adressbuch geforscht (Button: Write Memo). Dieser ruft ein Makro namens (CreateMailMemo) auf
@If(@TextToNumber(@Version) < 146; @Return(@Prompt([Ok];"Error";"You must use Notes 4.6 or above to use this action."));@Do(@SetProfileField("tempvars"; "Pmailaddress"; "MA");@Command([ToolsRunMacro];"(CreateMailMemo)")))
Zeile 1 prüft die Notesversion, 2 setzt im Profildokument das Feld Pmailadress auf MA und 3 ruft dann den Agent/Makro auf.
Das Makro selbst ist auch nicht sehr umfangreich, komme aber trotzdem nicht klar.
Option Public
Use "MailLibrary"
Sub Initialize
'declare local variables
Dim x As Integer
'instantiate objects
InstantiateVariables
If Not collection Is Nothing Then
If (collection.Count = 0) Then
Messagebox "No documents were selected.",0,"Error"
Exit Sub
End If
Else
Exit Sub
End If
Redim SendToNames(collection.Count-1)
'for each document in the collection, get the mail address
'we use the GetNth method since the resulting collection is an IDTable
For x = 1 To collection.Count
Set note = collection.GetNthDocument(x)
SendToNames(counter) = GetMailAddress
counter = counter + 1
Next
Set mailnote = New NotesDocument(maildb)
mailnote.SendTo = SendToNames
mailnote.Form = "Memo"
mailnote.Logo = profile.DefaultLogo(0)
mailnote.Principal = profile.Owner(0)
Call ws.EditDocument(True,mailnote)
End Sub
Alles anzeigen
Wo kommt MA her ? Und wie kommt das Script im endeffekt zur Adresse ? Hat jemand eine Idee, oder gar eine einfachere Lösung ?
Danke
Joerg