473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Showing a form in an .Net Outlook Add-In

I've created an Add-In for Outlook (2003) using VB.Net (VS 2005). I'm
having difficulty w/ getting either of the forms that I created to be
visible.

I've defined the forms as class-level variable in the Connect class. This
is the code that is executed in the method that handles the button.click
(button is a CommandButtonBar) event:

form_Export = New Form_Export
form_Export.Show()

What am I missing?

Thanks,

Craig Buchanan
Oct 20 '08 #1
3 1760
Are you entirely sure that your add-in is loading? Has it been disabled
maybe. Have a look in Outlook, Help, About, Disabled Items.

Try putting a MsgBox in the Connect class to make sure that you are
connecting correctly.
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.
"Craig Buchanan" wrote:
I've created an Add-In for Outlook (2003) using VB.Net (VS 2005). I'm
having difficulty w/ getting either of the forms that I created to be
visible.

I've defined the forms as class-level variable in the Connect class. This
is the code that is executed in the method that handles the button.click
(button is a CommandButtonBar) event:

form_Export = New Form_Export
form_Export.Show()

What am I missing?

Thanks,

Craig Buchanan
Oct 21 '08 #2
Alan-

There was an unhandled exception in the form's constructor that resulted in
the odd behavior.

Thanks for your reply.

"Alan Moseley" wrote:
Are you entirely sure that your add-in is loading? Has it been disabled
maybe. Have a look in Outlook, Help, About, Disabled Items.

Try putting a MsgBox in the Connect class to make sure that you are
connecting correctly.
--
Alan Moseley IT Consultancy
http://www.amitc.co.uk

If I have solved your problem, please click Yes below. Thanks.
"Craig Buchanan" wrote:
I've created an Add-In for Outlook (2003) using VB.Net (VS 2005). I'm
having difficulty w/ getting either of the forms that I created to be
visible.

I've defined the forms as class-level variable in the Connect class. This
is the code that is executed in the method that handles the button.click
(button is a CommandButtonBar) event:

form_Export = New Form_Export
form_Export.Show()

What am I missing?

Thanks,

Craig Buchanan

Oct 22 '08 #3
When you use a try...catch block in your managed code you'll be catching
both .NET errors as well as COM exceptions.

Depending on what your code is doing you might also cause unhandleable
exceptions that won't come to your error handling and in some cases might
only fire after your addin is disconnected or Outlook is closed. I've seen
that with some errors that were seen with WordMail where after exit you see
a kernel32 error.

Outlook itself isn't going to catch any errors for you, but it will fire
errors up through the CLR and those would be COM exceptions since Outlook is
unmanaged code.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Craig Buchanan" <Cr***********@discussions.microsoft.comwrote in message
news:A0**********************************@microsof t.com...
There was an exception in the form's constructor that being thrown but not
caught by Outlook, so the code hung. I've corrected the code and the form
works as expected.

Incidentally, is there a type of exception that I can be caught by
Outlook?
Probably a COM-type exception, I'll wager.

Thanks for your time, Ken.
Oct 22 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Marcel Stör | last post by:
Hi all, I'm trying to add a user property to an Outlook contact item. VisualStudio tells me that the method signature was like this: UserProperties.Add(string Name,Outlook.OlUserPropertyType...
1
by: Jonathan Pinto | last post by:
I was wondering if it would be possible to snapshot an access report to Outlook, and have fields come in the To: and Cc: fields, and also the subject field of the email as well. Right now, I am...
0
by: Marcel Stör | last post by:
Hi all, I'm trying to add a user property to an Outlook contact item. VisualStudio tells me that the method signature was like this: UserProperties.Add(string Name,Outlook.OlUserPropertyType...
3
by: Brenny | last post by:
Hello I'm designing a windows form and form's background image is exist and I added a label and groupbox. There is a spesific image on the form and I want to show this image as label and...
5
by: John | last post by:
Hi How can I show a dialog from within the main form? frmdialog.show? Thanks Regards
4
by: Nicole | last post by:
I found this code below to use to send emails using VB with Outlook. However, it gives these errors. 'Send' is ambiguous across the inherited interfaces 'Outlook._MailItem' and...
3
by: mwolowski | last post by:
Hello, I'd like to add tasks, appointments, etc using c# to outlook For example i added reference using OutLook = Microsoft.Office.Interop.Outlook; and the code: 1. ---------------------...
4
by: Andy | last post by:
Hi, I have a C# application and I'd like it to use Outlook 2003 to send messages. I don't want to send them programmaticlly though; I just want to open the New Messge window, set the...
0
by: DianaC | last post by:
Hi. I have to generate and send emails from C#.net 2.0 and have to use outlook. I am using Redemption to bypass the outlook security checks, but have the same problem when using CDO. I create an...
1
by: andyoye | last post by:
Below code is attached with a button on my infopath form. It does work ( auto populates "To:" and "Subject" based on form nodes) but how can I attach the file to the message which is attached to...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.