 |
|
 |
Could this be modified to access any PST? I output PST files from kvs enterprise vault but then want to read each PST and parse out the data I need.
|
|
|
|
 |
|
 |
While I was debbuging I found to an ineresting bug and exception that is swolen inside the code
In class methods eg. LoadInboxItems and others where you are going to get next, at the last item objItems.GetNext() returns null value. The result is exception that is written to Console so without carefull looking it wanish and possibly won't be seen
So the resolution is to modify code like this (in all methods working with GetNext() method of Outlook.Items collection of course):
outlookItem = objItems.GetNext();
if (outlookItem ==null)
break;
P.S.
It is wise to show Exception message to the user in such cases, or throw some custom message or handle it in some way that would be obvious to the user or fellow programer.
P.S.S Great work tough!!! Thx for the code!
Preky
|
|
|
|
 |
|
 |
When i try to run the code it is count the number of calendar items as 2 and contacts as 5 etc(and these figures are correct). But when the data is exported to xml both the items are same. That means under contacts there are 5 items but all the 5 are the same record. ie. the first record. Why is this happening like this. Also i did an iteration through the code runtime and i am storing subject and body in a temp variables. But those values are always having the same values (the 1st record). Can anybody tell me what is the change to be made to read record by record in contacts or calendar. Please help .
for (int i=0; i < objFolder.Items.Count; i++)
{
item = (Outlook.AppointmentItem) objFolder.Items.GetNext();
string sub = item.Subject;
string bd = item.Body;
rv.Tables[0].Rows.Add(new object[] {
item.Subject,
item.Location,
item.Start,
item.Body
});
this.ItemProcessed();
}
|
|
|
|
 |
|
 |
I ran into the same problem and changed the code to make it work. Alternately, try getting version 1.0. In the release notes 1.1 he said he stopped using the the Enumerator and changed it to a for loop for compatibility with office 10. However, I think that broke the program for Office 11 (2003) as the GetNext() method on the Items collection doesn't seem to work properly, I kept getting the same item repeated over and over.
This is what I did to get 1.1 to work. It worked for me but YMMV and all the usual disclaimers. Get rid of the For loop in the get*DataSet methods and make them while loops with the IEnumerator like this (this is for the OutlookConnector.GetInboxData() method)
System.Collections.IEnumerator MsgEnum = objFolder.Items.GetEnumerator();
while (MsgEnum.MoveNext())
{
item = (Outlook.MailItem) MsgEnum.Current;
rv.Tables[0].Rows.Add(new object[] { item.SenderName,
item.To,
item.CC,
item.Subject,
item.ReceivedTime,
item.Body
});
this.ItemProcessed();
}
|
|
|
|
 |
|
 |
It changed the code bold line
for (int i=1; i <= objFolder.Items.Count; i++)
{
item = (Outlook.MailItem) objFolder.Items.Item(i);
rv.Tables[0].Rows.Add(new object[] {
item.SenderName,
item.To,
item.CC,
item.Subject,
item.ReceivedTime,
item.Body
});
this.ItemProcessed();
}
|
|
|
|
 |
|
 |
The code as written returns the same first item each time.
The reason is that every time GetNext is called
the code retrieves a new instance of the Items object.
Solution: Store the Items object in a local variable to make sure you are always using the same
instance
new code
objFolder = objNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.Items Items= objFolder.Items;
item = (Outlook.MailItem) Items.GetFirst();
while (null != item)
{
item = (Outlook.MailItem)Items.GetNext();
rv.Tables[0].Rows.Add(new object[] {
item.SenderName,
item.To,
item.CC,
item.Subject,
item.ReceivedTime,
item.Body
});
this.ItemProcessed();
}
RDerby
|
|
|
|
 |
|
 |
I tried to execute the getting calendar items and contracts items from the code and i am always getting only the first record. In debug mode i have inserted a a string variable to get the exception and the exception you can see in this screenshot. http://www.guidant-cor.com/tempfiles/exceptionscreen.jpg
Can anybody help me with this. Please reply as when is the cause of the error.
|
|
|
|
 |
|
 |
how can i extract the e-mails of an additional profile setup on ms outlook? any idea?
|
|
|
|
 |
|
 |
hi.. i'm fairly new with the .net technology. can i display the exports on a web page using asp.net? is it also possible to "parse" the subject and when it found a "CRITICAL" string, i would have to color code the whole row with red, and if "WARNING" yellow? any idea? thanks
|
|
|
|
 |
|
 |
Could you please help to send fax from my C# application
through FaxMaker for Exchange ( NO SMTP )?
Thanks in advance.
Best Regards,
Fayeez
|
|
|
|
 |
|
 |
i Use OutlookConnector Project and Outlook.MailItem in my program .i have outlook xp.I want to
access to sendername or to or cc of it .I want To "GET" Item.To And I dont want to "Set" it. but when i want to read them
i got this prompt:A program is trying to access e-mail addresses you
have stored in outlook.
how can i disable this prompt.
|
|
|
|
 |
|
 |
For fully integrating into Outlook, you might do as MIRo2K4 suggests and implement an Outlook.Namespace.Logon() through a custom prompt or initialization process. The default prompt is meant to protect access (read or write) and not authorization (possibly in Mailbox Profiles?).
|
|
|
|
 |
|
 |
when i try to export i got this msgbox "echec de query pour l interface Outlook._Application"
xml files still create but withs just
XML document must have a top level element. Error processing resource 'file:///C:/Documents and Settings/clemence/Bureau/Ou...
and the source still empty
any idea ?
Clemence
|
|
|
|
 |
|
 |
Thanks to the folks at SourceForge, you can access the updated v1.2 code from http://sourceforge.net/projects/magimsocon/. This release includes a couple structural changes based on feedback here (thanks!) and the ability to save attachments.
If there's a feature you can either suggest or help with (i.e. visual schema-based data mapping), let me know. Cheers,
--
Mathias
|
|
|
|
 |
|
 |
File is corrupted, and has been so since original uplaod, so dont waste time downloading..
|
|
|
|
 |
|
 |
I fixed the zip file now on SourceForge, so sorry for not seeing these posts sooner. I'm without Visual Studio license so I've focused more on the open source toolkits. That being said, the build process may change in the future.
|
|
|
|
 |
|
 |
I am a C++ developer & new to Outlook 2003 programming.
My goal is to customize the Outlook 2003 New Message Form & add some controls (e.g CheckBox) in the Message area.
I would appreciate if you can sugest me if doing it with C# might be a good route.
Also are there any good book avaialble on customizing Outlook.
Thanks
|
|
|
|
 |
|
 |
how can i get Attachments of mails ?
|
|
|
|
 |
|
 |
Just add the code where mails are being fetched..
if(item.Attachments.Count>0)
{
for(int a=1;a<=item.Attachments.Count;a++)
{
Outlook.Attachment att= item.Attachments[a];
att.SaveAsFile(@"c:\temp\" + att.FileName);
}
}
|
|
|
|
 |
|
 |
hi Prakash Kalakoti,
My problem is i don't want to save the attachments I want to open the attachment in another page.
It means i want to open the attachments dynamically.
do u hv any idea for tht?
|
|
|
|
 |
|
 |
Instead I used Sendername. But don't understand if it is the problem of outlook 2000? Does 2003 get it?
|
|
|
|
 |
|
 |
I tried this on Outlook2000. As you mentioned I did got an error because of the reference. After that another error says "foreach statement cannot operate on variables of type 'Outlook.Items' because 'Outlook.Items' does not contain a definition for 'GetEnumerator', or it is inaccessible." What should I do?
|
|
|
|
 |
|
 |
You must use the Item count property
For I as Integer = 0 to Item.Count
'Do some thing
Next I
Forever Developing
|
|
|
|
 |
|
 |
Thanks, the problem is solved.
|
|
|
|
 |
|
 |
how did you corige it plz ?
cause when i use
//foreach (System.Object _item in objFolder.Items)
for(int i=1;i< objFolder.Items.Count;i++)
{
item = (Outlook.AppointmentItem)_item;
i got an eror with _item
|
|
|
|
 |