Hi Kollegen und -innen,
ich bin ja Admin und kein Entwickler, deshalb bräuchte mal kurz eure Hilfe :-)
Ausgangslage:es soll in diversen Mailboxen eine gemeinsame Mailvorlage zur Verfügung gestellt werden
Lösungsansatz:ich hab' ein Script gefunden, das über einen Button-Hotspot in einer Mail den Bodytext als Vorlage in der Mailbox des Users speichert. Also grundsätzlich das, was ich brauche.
Problem:Wie bekomme ich beim Kopiervorgang (wenn die Mail zur Vorlage wird) den Button-Hotspot raus, sodass dieser in der Vorlage nicht mehr enthalte ist?
wenn ich das "rtitem.remove" nämlich drin lasse
Dim rtitem As NotesRichTextItem
Set rtitem = Stationdoc.GetFirstItem("Body")
Call rtitem.remove
ist immer alles weg, nicht nur der Button.
Ich hoffe, ich hab' mich verständlich ausgedrückt :-)
Hier der Scriptcode, der hinter der Schaltfläche liegt:
| |
| Sub Click(Source As Button) |
| Dim ws As New NotesUIWorkspace |
| Dim s As New NotesSession |
| Dim uidoc As NotesUIDocument |
| Dim doc As NotesDocument |
| Dim db As NotesDatabase |
| Dim StationDoc As NotesDocument |
| |
| Set db = s.CurrentDatabase |
| Set uidoc = ws.CurrentDocument |
| Set doc = uidoc.Document |
| |
| Set StationDoc = doc.Copytodatabase(db) |
| |
| Dim rtitem As NotesRichTextItem |
| Set rtitem = Stationdoc.GetFirstItem("Body") |
| Call rtitem.remove |
| |
| Call StationDoc.RemoveItem("DefaultMailServerOptions") |
| Call StationDoc.RemoveItem("PostedDate") |
| Call StationDoc.RemoveItem("ExcludeFromView") |
| Call StationDoc.RemoveItem("Recipients") |
| Call StationDoc.RemoveItem("$Revisions") |
| Call StationDoc.RemoveItem("$VERREF") |
| Call StationDoc.RemoveItem("$VersionOpt") |
| |
| StationDoc.ISMAILSTATIONERY = 1 |
| StationDoc.MAILSTATIONERYNAME = "Ihre Anfrage" |
| StationDoc.SendTo = "" |
| StationDoc.Subject = "" |
| |
| Call StationDoc.Save(True,True) |
| |
| Msgbox "Bitte schließen Sie jetzt diese Nachricht, öffnen Sie ''Werkzeuge'' - ''Vorlagen'', um zur Vorlage ''hre Anfrage'' zu gelangen." |
| |
| End Sub |
| |