Add Folder and Grid in Outlook

Add-in Express™ Support Service
That's what is more important than anything else

Add Folder and Grid in Outlook
Outlook Folder and Grid 
Ed Salgado




Posts: 16
Joined: 2010-06-17
All,

I am trying to implement a separate InBox in Outlook for documents that will be sent through a separate system (not SMTP). I've tried to look on the website and can't find how to simple add a new folder in Outlook that would say something like "Special Inbox" or some such. When they click on that folder, we would display a frame of containing a grid with our inbox.

Is there any sample code to do this?

Thanks!

-ed
Posted 17 Jun, 2010 11:41:53 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi Ed,

Creating a new folder is simple: you call the Add method of the Folders collection of the parent folder, see http://msdn.microsoft.com/en-us/library/bb220308(office.12).aspx and http://support.microsoft.com/kb/310244.

When creating a folder on the same level as Inbox, the parent folder for the new folder can be found in this code path: OutlookApp.Session.Folders.Item(i). On one of my Outlook profiles, i=1 returns a top level folder of the first store in that profile; the folder name is Personal Folders.

As to showing a grid, you can opt to using the native Outlook grid or replacing it with a custom form in the WebViewPane layout, see http://www.add-in-express.com/docs/net-outlook-forms.php.


Andrei Smolin
Add-in Express Team Leader
Posted 18 Jun, 2010 01:51:57 Top
Ed Salgado




Posts: 16
Joined: 2010-06-17
Thanks for the response... I was able to add a folder to the inbox with your help.

In reading your "Custom Outlook Forms" link. It looks like to me that the only way to add custom forms is using .Net. Is there any way to create a custom viewer using this COM object interface in Delphi 2007 so that we can use the DevExpress grids we are so use to using?

If not, can you think of another way of creating a custom inbox with our data instead of email?

The other possibility is figuring out a way for .Net Custom Form to insert a Delphi Win32 form on top of itself somehow.

One last possibility is for me to add my entries to the grid displayed by Outlook (and hide the columns I don't want to show). I suppose this would require me to add a new SMTP account and force it to download into my folder (using a rule possibly)?

Again, any help you can provide would be very much appreciated.

Thanks!

-ed
Posted 30 Jun, 2010 11:12:23 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi Ed,

That was my fault: I hadn't paid attention to the forum ID. You can use custom Outlook Forms in Delphi, see http://www.add-in-express.com/creating-addins-blog/2010/05/21/outlook-regions-delphi-video-howto/.


Andrei Smolin
Add-in Express Team Leader
Posted 01 Jul, 2010 03:52:50 Top
Ed Salgado




Posts: 16
Joined: 2010-06-17
That is very cool, except I need to replace Outlook's grid altogether with my own. I did have another idea though. Can I display my Delphi form INSTEAD of outlooks mail editor when a specific attachment is included in an email? This would do perform basically everything I need as well.

Thanks again!

-ed
Posted 07 Jul, 2010 10:52:21 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hi Ed,

You can show your form in the InspectorRegion layout. Or, if you need not to show the inspector window, you can get the Outlook item that is being opened in the NewInspector event via inspector.CurrentItem, connect to the events of the item, cancel the Open event and show your form instead.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Jul, 2010 11:07:10 Top
Ed Salgado




Posts: 16
Joined: 2010-06-17
Andrei,

Thanks again for the quick response...

I'll give that a try!

Thanks!

-ed
Posted 07 Jul, 2010 13:38:16 Top