Stop attachments being added to a RICH TEXT field. Lotus Notes Attachments
| Your Email Address | steve.robinson@notes411.com |
| Your Name | SCRobinson |
| Company Name | Notes411 |
| Subject | Stop attachments being added to a RICH TEXT field. Lotus Notes Attachments |
Details
| Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Resume Next
Dim doc As NotesDocument
Dim item As Variant
Call source.Refresh( True )
Set doc = source.Document
If doc.bodytype(0) = "attachment" Then
Set item = doc.GetFirstItem( "richtext" )
If Not Isempty( item.EmbeddedObjects) Then
n = 0
Forall att In item.EmbeddedObjects
If att.Type = EMBED_ATTACHMENT Then
n = n +1
End If
End Forall
If n > 1 Then
'continue = False
'Msgbox ( " Only one attachment in [ Attachment ] field allowed"),16,"Not Saved"
End If
End If
End If
If doc.bodytype(0) = "richtext & attachment" Then
Set item = doc.GetFirstItem( "richtext" )
If Not Isempty( item.EmbeddedObjects) Then
n = 0
Forall att In item.EmbeddedObjects
If att.Type = EMBED_ATTACHMENT Then
n = n +1
End If
End Forall
If n > 1 Then
'continue = False
'Msgbox ( " Only one attachment in [ Attachment ] field allowed"),16,"Not Saved"
End If
End If
End If
If doc.bodytype(0) = "text & attachment" Then
Set item = doc.GetFirstItem( "richtext" )
If Not Isempty( item.EmbeddedObjects) Then
n = 0
Forall att In item.EmbeddedObjects
If att.Type = EMBED_ATTACHMENT Then
n = n +1
End If
End Forall
If n > 1 Then
'continue = False
'Msgbox ( " Only one attachment in [ Attachment ] field allowed"),16,"Not Saved"
End If
End If
End If
If doc.bodytype(0) = "richtext" Then
Set item = doc.GetFirstItem( "richtext" )
If Not Isempty( item.EmbeddedObjects) Then
n = 0
Forall att In item.EmbeddedObjects
If att.Type = EMBED_ATTACHMENT Then
n = n +1
End If
End Forall
If n > 0 Then
continue = False
Msgbox ( " No attachments in [ Rich Text ] field allowed"),16,"Not Saved"
End If
End If
End If
End Sub |
| Attachments | -none- |
| Operating System | Windows NT, Windows 2000, Windows XP |
| Technologies Implimented | Lotus Script |
| Installation Notes | |
| Category | R5.x, ND6.x, Other |
 |  |
Add Response || Add a Resource
Responses to "Stop attachments being added to a RICH TEXT field. Lotus Notes Attachments":
|
|