1
87VV7D
  Resources Home :

Stop attachments being added to a RICH TEXT field. Lotus Notes Attachments


Your Email Addresssteve.robinson@notes411.com
Your NameSCRobinson
Company NameNotes411
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 SystemWindows NT, Windows 2000, Windows XP
Technologies ImplimentedLotus Script
Installation Notes
CategoryR5.x, ND6.x, Other
Add Response   ||  Add a Resource


Responses to "Stop attachments being added to a RICH TEXT field. Lotus Notes Attachments":

© 2003 notes411.com. All rights reserved. Disclaimer. site designed & developed by appsworks.com
Lotus Notes is a registered trademark of IBM. This site is not affiliated with IBM or Lotus.
NotesFAQ and DominoFAQ. Lotus Notes Links and Lotus Domino Links to Lotus Notes resources / Lotus Domino resources. Lotus Domino websites. Lotus Notes websites. Lotus Notes business partners. Lotus Domino business partners. IBM business partners. IBM Lotus Software. Websites build with Lotus Domino. Tools for Lotus Notes. Tools for Lotus Domino. Lotus Notes Tips and Tricks. Lotus Domino Tips and Tricks. Lotus Notes support. Lotus Domino support. Books about Lotus Notes. Books about Lotus Domino. Lotus Domino Administrators. Lotus Notes Developers. Lotus Domino Developers. Lotus Notes templates. Lotus Domino templates. .NSF .NTF Lotus Domino security. Lotus Domino Hosting. Lotus QuickPlace, Lotus Sametime, Lotus iNotes, Domino and Websphere, Lotus LearningSpace. Lotus Notes job postings, Lotus Domino job postings. And many more Lotus Domino resources and Lotus Notes resources. NotesLinks and DominoLinks bring all Lotus Notes Links and Lotus Domino Links. Search on this website for many. Please post your links and resources on Notes411 (Lotus Notes Resources)and Domino Links (Lotus Domino Resources) see you again on Notes411.com and DominoFaq.com
 News

 Google Box
 Sponsor
ClearCase, Subversion, WebSphere Consulting
 Best in the Industry
Lotus Notes & Domino FAQ