.NET / Outlook interop and saving attachments: a mysterious except
- From: psinis <psinis@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Aug 2008 10:43:04 -0700
Greetings,
This is a question about the .NET / Outlook interop, from a .NET novice. I’m
using C# and MS Visual Studio 2008, MS Outlook 2003 and Xobni (not sure if
that’s relevant).
QUESTION 1:
-=-=-=-=-=-=-
The code goes into my inbox, iterates over each message, and saves all
attachments to a directory. Each time I run the code, it successfully saves
approx 30 attachments but then throws an exception which I don’t understand.
Could anyone please shed some light on this?
Exception details and code are nicely formatted at:
http://forums.msdn.microsoft.com/en-US/csharpgeneral/thread/0ee08455-f9d0-45ad-a03e-b69c4417c4f7
QUESTION 2
-=-=-=-=-=-=-
In the same code, I added the following two lines (the ultimate goal is to
strip out the sender's domain and append it to the filename of each
attachment).
However, my app freezes when I request the MailItem.SenderEmailAddress
property.
Console.WriteLine("Title: {0}", item.Subject); // this one works fine
Console.WriteLine("Email: {0}", item.SenderEmailAddress); // this one freezes
.
- Follow-Ups:
- RE: .NET / Outlook interop and saving attachments: a mysterious except
- From: Sue Mosher [MVP-Outlook]
- RE: .NET / Outlook interop and saving attachments: a mysterious except
- Prev by Date: Sharepoint Designer 2007 in Server 2003 x64
- Next by Date: RE: VBA Training
- Previous by thread: Sharepoint Designer 2007 in Server 2003 x64
- Next by thread: RE: .NET / Outlook interop and saving attachments: a mysterious except
- Index(es):
Relevant Pages
|
Loading