Click here to Skip to main content
15,918,275 members
Home / Discussions / C#
   

C#

 
QuestionRe: How to Add an .msi file to a setup project????? Pin
nelluru12-Jun-07 20:50
nelluru12-Jun-07 20:50 
QuestionOutlook Addin Problem/Error Pin
Walaza11-Jun-07 21:11
Walaza11-Jun-07 21:11 
QuestionTag usage Pin
M. J. Jaya Chitra11-Jun-07 20:51
M. J. Jaya Chitra11-Jun-07 20:51 
AnswerRe: Tag usage Pin
CPallini11-Jun-07 21:12
mveCPallini11-Jun-07 21:12 
AnswerRe: Tag usage Pin
Christian Graus11-Jun-07 21:13
protectorChristian Graus11-Jun-07 21:13 
GeneralRe: Tag usage Pin
M. J. Jaya Chitra11-Jun-07 21:16
M. J. Jaya Chitra11-Jun-07 21:16 
AnswerRe: Tag usage Pin
Sathesh Sakthivel11-Jun-07 21:14
Sathesh Sakthivel11-Jun-07 21:14 
QuestionOutlook Addin Exception Pin
Walaza11-Jun-07 20:47
Walaza11-Jun-07 20:47 
Hi everyone,
I developed an Outlook Addin that is supposed to open a certain application depending on the subject of the Email that I receive. The app works fine but after clicking OK to all MessageBoxes, I get the ff error:

Object reference not set to an instance of an object.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at Outlook_Drag_Try.ThisApplication.ThisApplication_Startup(Object sender, EventArgs e) in C:\Inetpub\wwwroot\DRAGGER\Outlook_Drag_Try\Outlook_Drag_Try\ThisApplication.cs:line 31
at Microsoft.Office.Tools.Outlook.Application.OnStartup()
at Outlook_Drag_Try.ThisApplication.FinishInitialization() in C:\Inetpub\wwwroot\DRAGGER\Outlook_Drag_Try\Outlook_Drag_Try\ThisApplication.Designer.cs:line 65
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecutePhase(String methodName)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecuteCustomizationStartupCode()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ExecuteEntryPointsHelper()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.Microsoft.VisualStudio.Tools.Applications.Runtime.IExecuteCustomization2.ExecuteEntryPoints()


************** Loaded Assemblies **************

Here is my code:

string filter = "ecs";

Outlook.NameSpace outlookNameSpace = this.GetNamespace("MAPI");
//Outlook.MAPIFolder inbox = outlookNameSpace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox);
Outlook.MAPIFolder inbox = this.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);

/*Retrieve and count unread messages from Inbox */
Outlook.Items items = inbox.Items;
Outlook.Items unreadItems = inbox.Items.Restrict("[Unread]=true");
MessageBox.Show(string.Format("The number of Unread items in Inbox = {0}", unreadItems.Count));

// If the mail item matches the specified filter,
// open The Dragger application
foreach (Outlook.MailItem mail in items)
{
//if the mail's subject has ecs, open The Dragger
if (mail.Subject.ToUpper().Contains(filter.ToUpper()))
{
//Open The Dragger
MainForm main = new MainForm();
main.ShowDialog();
}
else
{
MessageBox.Show("No new messages for ECS!!!");
}
}

Please help...

Mvelo Walaza
Jnr Developer
Telkom SA

AnswerRe: Outlook Addin Exception Pin
Le centriste12-Jun-07 4:37
Le centriste12-Jun-07 4:37 
GeneralRe: Outlook Addin Exception Pin
Walaza12-Jun-07 20:13
Walaza12-Jun-07 20:13 
GeneralRe: Outlook Addin Exception Pin
Le centriste13-Jun-07 1:37
Le centriste13-Jun-07 1:37 
QuestionHoow to Fill Dock and overlap control panels? Pin
Khoramdin11-Jun-07 20:43
Khoramdin11-Jun-07 20:43 
AnswerRe: Hoow to Fill Dock and overlap control panels? Pin
Martin#11-Jun-07 21:06
Martin#11-Jun-07 21:06 
AnswerRe: Hoow to Fill Dock and overlap control panels? Pin
Sathesh Sakthivel11-Jun-07 21:08
Sathesh Sakthivel11-Jun-07 21:08 
AnswerRe: Hoow to Fill Dock and overlap control panels? Pin
leppie11-Jun-07 23:07
leppie11-Jun-07 23:07 
QuestionAssembly Version Pin
Rahul.RK11-Jun-07 20:40
Rahul.RK11-Jun-07 20:40 
AnswerRe: Assembly Version Pin
Vikram A Punathambekar11-Jun-07 22:18
Vikram A Punathambekar11-Jun-07 22:18 
QuestionBest way to pass a large array from win32 DLL to C# Pin
tidyup11-Jun-07 20:33
tidyup11-Jun-07 20:33 
AnswerRe: Best way to pass a large array from win32 DLL to C# Pin
J. Dunlap11-Jun-07 21:56
J. Dunlap11-Jun-07 21:56 
AnswerRe: Best way to pass a large array from win32 DLL to C# Pin
Luc Pattyn12-Jun-07 0:49
sitebuilderLuc Pattyn12-Jun-07 0:49 
QuestionFile not found Exception [how to solve this] Pin
ridda78611-Jun-07 19:58
ridda78611-Jun-07 19:58 
AnswerRe: File not found Exception [how to solve this] [modified] Pin
kkun11-Jun-07 20:22
kkun11-Jun-07 20:22 
GeneralRe: File not found Exception [how to solve this] Pin
ScottM111-Jun-07 22:01
ScottM111-Jun-07 22:01 
GeneralRe: File not found Exception [how to solve this] Pin
ridda78612-Jun-07 0:12
ridda78612-Jun-07 0:12 
AnswerRe: File not found Exception [how to solve this] Pin
leppie11-Jun-07 23:10
leppie11-Jun-07 23:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.