Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Mick's travel tricks: miscellaneous tools for your traveling needs (continued)

FIELD $ref := @DeleteField;
FIELD $refoptions := @DeleteField;
FIELD orgrepeat := @DeleteField;
FIELD repeatweekend := @DeleteField;
SELECT @All

Remove attx.xxx attachments
Many of my emails appear in Notes as text and also have an att1.eml or att1.htm attachment, which is usually the email body in another format: Outlook or HTML. I created an agent that removes all of these attachments but leaves other attachments intact. I run this from my Attachment view that we looked at in my March 2002 article at http://www.dominopower.com/issues/issue200203/travel0302001.html). The code is as follows:

Sub Initialize
Dim sess As New notessession
Dim db As NotesDatabase
Dim docs As NotesDocumentCollection
Dim doc As NotesDocument

Set db = sess.CurrentDatabase
Set docs = db.UnprocessedDocuments
Set doc = docs.GetFirstDocument
Dim attremoved As Variant
count = 0
Do While Not (doc Is Nothing)
count = count + 1
Print count " of " docs.count
attremoved = objdel(doc, "att1.eml")
attremoved = attremoved Or objdel(doc,"att2.eml")
attremoved = attremoved Or objdel(doc,"att3.eml")
attremoved = attremoved Or objdel(doc,"att4.eml")
attremoved = attremoved Or objdel(doc,"att5.eml")
attremoved = attremoved Or objdel(doc,"att6.eml")
attremoved = attremoved Or objdel(doc,"att7.eml")
attremoved = attremoved Or objdel(doc,"att8.eml")
attremoved = attremoved Or objdel(doc,"att9.eml")
attremoved = attremoved Or objdel(doc,"att1.htm")
attremoved = attremoved Or objdel(doc,"att2.htm")
attremoved = attremoved Or objdel(doc,"att3.htm")
attremoved = attremoved Or objdel(doc,"att4.htm")
attremoved = attremoved Or objdel(doc,"att5.htm")
attremoved = attremoved Or objdel(doc,"att6.htm")
attremoved = attremoved Or objdel(doc,"att7.htm")
attremoved = attremoved Or objdel(doc,"att8.htm")
attremoved = attremoved Or objdel(doc,"att9.htm")
attremoved = attremoved Or objdel(doc,"att1.unk")
attremoved = attremoved Or objdel(doc,"att2.unk")
attremoved = attremoved Or objdel(doc,"att3.unk")
attremoved = attremoved Or objdel(doc,"att4.unk")
attremoved = attremoved Or objdel(doc,"att5.unk")
attremoved = attremoved Or objdel(doc,"att6.unk")
attremoved = attremoved Or objdel(doc,"att7.unk")
attremoved = attremoved Or objdel(doc,"att8.unk")
attremoved = attremoved Or objdel(doc,"att9.unk")

If attremoved = True Then Call doc.Save(True, True)

Set doc = docs.GetNextDocument(doc)
Loop
Print "Done"
End Sub

Function objdel(doc As notesdocument, attfilename As String)
Dim object As NotesEmbeddedObject
Dim rtitem As Variant
Set rtitem = doc.GetFirstItem( "Body" )
objdel = False
If ( rtitem.Type = RICHTEXT ) Then
'look for objects...
Set object = rtitem.GetEmbeddedObject(attfilename)
If object Is Nothing Then
Else
Call object.Remove
objdel = True
End If
End If
End Function


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  Next »
Other articles you might like
Home > Strategies > Travel (7 articles)
   Troubleshooting Lotus Notes Traveler: the basics
   Micks travel tricks: rationing your valuable laptop real estate
   Mick's travel tricks: dealing with time zones
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Mark your calendar for in-depth Lotus training, May 12-14, Boston
Join experts and peers May 12-14 in Boston for educational and networking events that deliver real-world Lotus training so you can increase productivity and efficiency in your company, advance your skills, and squeeze the most from your current environment. One registration gets you into THE VIEW's Admin2010 and Lotus Developer2010.

Register by April 10 to save $200.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login