[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

How to interpret Subject field when sending email to document library?

Hi!

We are running a WSS site with several document libraries. When our users send emails to a certain document library in the subject field of the email they put the company name which becomes the destination folder in the library. So, if someone sending an email to the document library email address puts MYNEWCOMPANY in the subject line, such email with the attached files is placed by WSS under MYNEWCOMPANYNAME folder in the document library. If such folder doesn't exist, it is created automatically.

This library also contains a KEY field (column) which users then have to update manually in a spreadsheet mode directly on WSS page. This field is actually serving as a link between files. For example, to link documents and emails related to the same order or RFQ. Is there a way to automate this procedure so that users will add for example '/' between company name and description of the KEY in the email subject so that in the WSS this KEY description will be automatically copied to KEY filed so that they will not have to open document library and manually insert this descriptions each time after sending an email to a document library? Or there might be some better workaround to this problem?

For example, the library contains the following columns:

Type, Name, ModifiedBy, Document Type, KEY

When user will place in subject the string like 'CompanyName / Keytxt ' sharepoint will place the email with all the attached files into 'CompanyName' folder and 'Keytxt' in KEY column?
0
Zaurb
Asked:
Zaurb
1 Solution
 
Craig YellickDatabase ArchitectCommented:
This is really a SharePoint question and isn't something that can be solved on the SQL Server side of things.  SharePoint document libraries have an API with an event model. You can write a document library "listener" that reacts to events in a document's life cycle, from initial creation to changes to delete. In your case you'd listen for new documents being added to the library and then make whatever changes you desire to the new document. This includes renaming, adjusting properties and moving it between folders or even entirely different libraries.

Instead of creating folders I recommend putting all documents in a single root folder and using document properties (aka metadata) and views to provide different ways to filter and organize the documents. When you create folders you make it a lot more difficult to find and manage documents.

Here are some links to examples for adding event-handling code to document libraries:

http://msdn.microsoft.com/en-us/library/ms462433.aspx
http://weblog.vb-tech.com/nick/archive/2006/07/31/1706.aspx
0
 
ZaurbAuthor Commented:
I've also found that it is possible to use "SPEmailEventReceiver" Class (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spemaileventreceiver.aspx) for parsing emails in SP workflow. However, I have used SPD2007 for a couple of month now, but I have no idea on how to use Visual Studio to write customized things for SharePoint. Any help, links, walkthroughs on configuring Visual Studio for using with WSS are most welcome!

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now