Hi,
I have an error occuring on a postsave event on my customised mail template. The script works OK if the document database has been opened on the workstation but errors if it has not.
I have tried hard coding the server names and putting a / instead of \ in the path but no joy.
Code is as follows.
Any help would be greatly appreciated as it would be a great step forward for me to get a Linux install working properly.
Sub Postsave(Source As Notesuidocument)
'-- start of AJ Spook customisation
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim newDB As NotesDatabase
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Dim doc2 As NotesDocument
Dim projectDoc As NotesDocument
Dim calendarView As NotesView
Dim projectView As NotesView
Set db = session.CurrentDatabase
server=db.Server
Set newDb=session.GetDatabase(server, "ddarchs\documents.nsf")
Set doc2 = New NotesDocument( newDb)
Call doc.CopyAllItems( doc2, True )
doc2.Form="document"
doc2.emailSubject=doc.subject
Call doc2.Save(False, False)
'-- end of AJ Spook customisation
Call cMemoObject.PostSave()
End Sub