![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Outlook 2002 and above.
I am writing my first Add-In for Outlook. Using VS 2005 and the Extensibility project. I am not using VSTO. I am using C# not VB. I have been googling around, but as soon as I mention I want to create a "form", all the suggestions indicate I should create the form inside the Outlook UI. I need to write an Add-In that will: 1. Open an object (mail, cal, task, contact) 2. Display a button to assign it to an account 3. Display a list of accounts and allow the user to choose which one 4. Save the account number in a user defined field of the object. So far: 1&2. This was easy enough, found lots of examples that allowed me to create the button and perform an action. 3. I will be getting the list of accounts from an external source (a database actually). I guess I could create a folder and add items into this folder (not sure how to make the items in the folder read-only). So how do I create a form via the AddIn on the fly to allow the user to choose from a list of accounts? I am looking for a link to some sample that does something similar, I am guessing there is something out there that I can't find that will get me there most of the way. 4. That should be as simple as: Item.Userproperties.Add("MyField", 1) (but in C#). Any pointers or articles to get me on my way will be greatly appreciated. Thanks, Dave |
#2
|
|||
|
|||
![]()
You don't really want to create a form as I understand it, you want to
create Outlook items. That's something different. You can use Application.CreateItem to create whatever type items they are and populate the fields of the item with the information from your database tables. The only thing to be aware of is that items will be created in the default folder for that type of item (even in some cases if you got the folder you wanted the item in and used the folder.Items.Add() method. If that happens just save the item and then move it where you want it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "David" wrote in message ... Outlook 2002 and above. I am writing my first Add-In for Outlook. Using VS 2005 and the Extensibility project. I am not using VSTO. I am using C# not VB. I have been googling around, but as soon as I mention I want to create a "form", all the suggestions indicate I should create the form inside the Outlook UI. I need to write an Add-In that will: 1. Open an object (mail, cal, task, contact) 2. Display a button to assign it to an account 3. Display a list of accounts and allow the user to choose which one 4. Save the account number in a user defined field of the object. So far: 1&2. This was easy enough, found lots of examples that allowed me to create the button and perform an action. 3. I will be getting the list of accounts from an external source (a database actually). I guess I could create a folder and add items into this folder (not sure how to make the items in the folder read-only). So how do I create a form via the AddIn on the fly to allow the user to choose from a list of accounts? I am looking for a link to some sample that does something similar, I am guessing there is something out there that I can't find that will get me there most of the way. 4. That should be as simple as: Item.Userproperties.Add("MyField", 1) (but in C#). Any pointers or articles to get me on my way will be greatly appreciated. Thanks, Dave |
#3
|
|||
|
|||
![]() Thanks for the response. That is part of my problem, I am lacking the Outlook terminology. Let me describe what I plan to do, and then maybe you can equate it to how I would do it. When Outlook starts and loads my Add-In I will be connecting to a database. The database has a list of accounts in a table. When I open an object (email or contact) when I push a button I want to display (a form?) the list of accounts and allow the user to choose which account to "assign" this item to. Once chosen, I will update the database with the Outlook GUID. When I reopen the item and press the button again to redisplay the list of accounts I want to check the one chosen. In this case, it could easily be a combo box or something similar. Is that better? Dave "Ken Slovak - [MVP - Outlook]" wrote: You don't really want to create a form as I understand it, you want to create Outlook items. That's something different. You can use Application.CreateItem to create whatever type items they are and populate the fields of the item with the information from your database tables. The only thing to be aware of is that items will be created in the default folder for that type of item (even in some cases if you got the folder you wanted the item in and used the folder.Items.Add() method. If that happens just save the item and then move it where you want it. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "David" wrote in message ... Outlook 2002 and above. I am writing my first Add-In for Outlook. Using VS 2005 and the Extensibility project. I am not using VSTO. I am using C# not VB. I have been googling around, but as soon as I mention I want to create a "form", all the suggestions indicate I should create the form inside the Outlook UI. I need to write an Add-In that will: 1. Open an object (mail, cal, task, contact) 2. Display a button to assign it to an account 3. Display a list of accounts and allow the user to choose which one 4. Save the account number in a user defined field of the object. So far: 1&2. This was easy enough, found lots of examples that allowed me to create the button and perform an action. 3. I will be getting the list of accounts from an external source (a database actually). I guess I could create a folder and add items into this folder (not sure how to make the items in the folder read-only). So how do I create a form via the AddIn on the fly to allow the user to choose from a list of accounts? I am looking for a link to some sample that does something similar, I am guessing there is something out there that I can't find that will get me there most of the way. 4. That should be as simple as: Item.Userproperties.Add("MyField", 1) (but in C#). Any pointers or articles to get me on my way will be greatly appreciated. Thanks, Dave |
#4
|
|||
|
|||
![]()
In that case just use a Windows.Form object instead of worrying about
Outlook custom forms. When the button on the Inspector (open item window) is clicked you open the form and display a listbox or whatever on the form with other controls as appropriate. That's all you need to do. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "David" wrote in message ... Thanks for the response. That is part of my problem, I am lacking the Outlook terminology. Let me describe what I plan to do, and then maybe you can equate it to how I would do it. When Outlook starts and loads my Add-In I will be connecting to a database. The database has a list of accounts in a table. When I open an object (email or contact) when I push a button I want to display (a form?) the list of accounts and allow the user to choose which account to "assign" this item to. Once chosen, I will update the database with the Outlook GUID. When I reopen the item and press the button again to redisplay the list of accounts I want to check the one chosen. In this case, it could easily be a combo box or something similar. Is that better? Dave |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
C++ add ins for Outloo | Carlos | Add-ins for Outlook | 1 | August 14th 06 03:11 PM |
Creating Organizational Forms Library & Publish Forms | akafrog18 | Outlook - Using Forms | 1 | August 1st 06 04:26 PM |
comm add-ins | leonS | Outlook - Installation | 1 | May 1st 06 06:09 PM |
2006 Holiday add-ins? | jm | Outlook - Calandaring | 0 | April 23rd 06 06:11 PM |
New to add-ins | Sharad Naik | Add-ins for Outlook | 9 | January 26th 06 01:04 PM |