Hi all, in my memo form in the queryopen event i already have the following script:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Set cMemoObject = New UIMemoDocument
Call cMemoObject.Init(Source,Isnewdoc)
End Sub
However I want to also add another bit of code in that lets me know that someone has put a read reciept on the email and gives my the option to delete the read receipt. However when I try and copy and paste it into the queryopen event it all goes wrong! Here is the read receipt code:
Sub Queryopen(Source As Notesuidocument,
Mode As Integer, Isnewdoc As Variant,
Continue As Variant)
Set uidoc = Source
Set doc = Source.document
Dim workspace As NotesUIWorkspace
Dim RR As Variant
Dim boxType As Long, answer As Integer
If uidoc.IsNewDoc Then
' don't do anything, as this is a new document ...
Else
RR = doc.GetItemValue("ReturnReceipt")
If RR(0) = "1" Then
boxType& = MB_YESNO
answer% = Messagebox("Message configured for Return Reciept. Would you like to send a Return Receipt? (No will temporarily disable Return Receipt)", boxType&, "Continue?" )
If answer% = 7 Then
' determine if the user would like to return the receipt
doc.ReturnReceipt = "0"
Messagebox("Return Reciept disabled. No message will be sent")
'Call doc.save (True, True) enable this if you want to totally disable RR on this message
End If
End If
End If
End Sub
Can anyone tell me how to combine the two so that they will work?
thanks.
David.
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Set cMemoObject = New UIMemoDocument
Call cMemoObject.Init(Source,Isnewdoc)
End Sub
However I want to also add another bit of code in that lets me know that someone has put a read reciept on the email and gives my the option to delete the read receipt. However when I try and copy and paste it into the queryopen event it all goes wrong! Here is the read receipt code:
Sub Queryopen(Source As Notesuidocument,
Mode As Integer, Isnewdoc As Variant,
Continue As Variant)
Set uidoc = Source
Set doc = Source.document
Dim workspace As NotesUIWorkspace
Dim RR As Variant
Dim boxType As Long, answer As Integer
If uidoc.IsNewDoc Then
' don't do anything, as this is a new document ...
Else
RR = doc.GetItemValue("ReturnReceipt")
If RR(0) = "1" Then
boxType& = MB_YESNO
answer% = Messagebox("Message configured for Return Reciept. Would you like to send a Return Receipt? (No will temporarily disable Return Receipt)", boxType&, "Continue?" )
If answer% = 7 Then
' determine if the user would like to return the receipt
doc.ReturnReceipt = "0"
Messagebox("Return Reciept disabled. No message will be sent")
'Call doc.save (True, True) enable this if you want to totally disable RR on this message
End If
End If
End If
End Sub
Can anyone tell me how to combine the two so that they will work?
thanks.
David.