Lotus Notes - Auto Saving an attachment from a certain sender

Posted on 2008-10-29
Last Modified: 2013-12-18
Hi !

is there a way to create a rule / script which will autosave an attachement (csv file) i get from a certain sender?

i dont mind using 3rd party applications

thanks :)
Question by:m0tek
LVL 46

Accepted Solution

Sjef Bosman earned 125 total points
Comment Utility

Assisted Solution

johnjardin earned 125 total points
Comment Utility
Create an Agent that runs on selected documents and paste the below code inside the agent.

You can run this from an action menu, or from a button.

You will notice the code is simple enough to change in order to run it on different triggers, ( e.g. automatically when new mail arrives ).

Hope this helps
Sub Initialize


	Const FILE_PATH = "D:\My Images\"



	Dim ss As New NotesSession

	Dim db As NotesDatabase

	Dim col As NotesDocumentCollection

	Dim doc As NotesDocument


	Dim myitem As Variant

	Dim index As Integer



	Set db = ss.CurrentDatabase

	Set col = db.UnprocessedDocuments

	Set doc = col.GetFirstDocument


	index = 0 


	While Not( doc Is Nothing )

		Set myitem = doc.GetFirstItem( "Body" )


		If ( myitem.Type = RICHTEXT ) Then

			Forall v In myitem.EmbeddedObjects

				index = index + 1

				Call v.ExtractFile( FILE_PATH & v.Name )


			End Forall

		End If


		Set doc = col.GetNextDocument( doc )




End Sub

Open in new window


Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is an old article, please see an updated version of this article, located here:
You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now