Presenter:Steve Hansen
Custom form regions are an exciting new user interface capability in Outlook 2007. In this video Steve Hansen demonstrates how to create a basic adjoining custom form region.
The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video
Minute 0
Island in a sea canceled off a solid back on this video is harder great and enduring for resuming MacSoft Outlook 2007 start in the luck select tool forms and design a form for the message item and then do for region Reagan from there you can just drag and drop controls onto the surface from had a label a text box and command button blood do is just display the phone number from a from the sender e mail address and a look up at sorry no address in my contacts with a phone number and display the phone number in the formation from willing to add the controls and name the controls
Minute 1
Missile let that after you ve finished editing the controls select for resume today for written editors to save it up to your filesystem remember where you say that Jordan need to import this into our Visual Studio project in a few shave before raising can go and close the form no need to save your changes their enough got just the shell of a Visual Studio outlook and then using Visual Studio tools for office
Minute 2
And I m going to go into my resources and add the form region file I just created an Outlook and then I ve got a four reason manifest file that is created in another project and on and uses as the basis for my manifest file in this project so the four reason manifest file just contains the details that instructs Outlook how to how to display the form region and where to find the form region start up in her face so you can see here the
Minute 3
Toles form region phone for region is can be an adjoining formation type in the add in that implements before raising startup will be adjoining for region VB and save a file and close a dentist put it as a resource in the project to go tonight to need to add a class that implements for raising startup and going to add a class file to my project and need to do a few things are one is at a reference to the Microsoft forms library this is the library that Outlook uses for it
Minute 4
Trolls and I want to bore up those control so that it can receive events in my Visual Studio project and that reference and then import the namespace likewise import the namespace of Outlook and then live for reason class needs to implement the form region startup interface so I add that all of the methods on the stubs for the methods for this interface are added to the project and at a couple of class level variables one is a user form variable to hold a reference to the current form reason another is just the Outlook mail I
Minute 5
Comparable to hold a reference to the current item and then it creates a variables that will be a reference to the controls my for region so the first one I ll implement is the before form reason show this is the method that gets called by Outlook right before it is ready to display before raising and this is where you want to hook up any controls that are of the form region to variables in your Visual Studio project that can do things like scepter values were add event handlers things like that
Minute 6
Stillness whether I m going to set the set the reference to my mail item to my form reason to my text box control into my update command button for a little but more to do in a vote these levels are to be fairly easy for a music at form reason icon if you want to associate an icon with the former is an Ute implement that bothers return nothing here than in the form reason manifest and form reason stories Athens it is returned the files that you edit your resources so will those implement or go back and finish the form before for region show
Minute 7
And one of things I wanted to own a display the phone number in the text phone text box control soon a better method to look up a phone number and I ll neither do here is look at the e mail address of the sender whoever sent the e mail see if I can find it in my contacts in the front I find in the context disc are then returned the business telephone number and they ll display that in the text text box the phone text box to use a new object in Outlook 2007 the table object which allows you to do their rate over or look at a bunch of items in a public folder
Minute 8
Rather than iterating over each item until he finally a song I get the default folder for the contacts in the unused gift table with a filter string here where the e mail address is equal to the sender e mail address of my mail item in the mail item is currently selected after so not have got the table and listen add a column to a stone sure that the business
Minute 9
Own field and that if there is a phone that s me under the table means I ve got a least one row and just assume whatever s in the first row is the item that I want to create a row variable and then return the value of the business phone field and exhale into is to be the update button so that if you change the phone number in the former evening clicked update for merger will go back into the contacts and up to update the business phone number appropriately survey
Minute 10
At a button update click event handler and is that a reference to the contacts folder into this a little bit different than I how I handled the retrieving the phone number the Outlook table object is very quick for retrieving items from a folder Harvard s only is read only so if you want to join the edit items you need to do another way so in this instance I was going to iterate over the items in the contacts until I find the one that is a match and then change it
Minute 11
There are better ways to do this you could use the table object and then you can retrieve the item using the ID that you return it since I ll have a lot of items and if you have a lot of items in the fourth as one would perform his fine so when a friend at this going to set the e mail address and then save the item and the item will be updated so that there is another toward which is to override the request service method
Minute 12
So that we can handle the former in start up will make sure bills and then I need to start the EU Registry editor and add a registry key and the attitude computer HT current user software Microsoft office Outlook for reasons than to the IPM note and add a new string value with the name of money for region and then for the data just put in equals and then whatever the name of the ad in as
Minute 13
So rather than adjoining for even one of the nice things about it is that for reasons also display in the reading pane hesitancy here so I ve got a phone number for Kelly and you can see it s the same as the contacts that can go hand in change it in the reading pane here and click update and if I go back over to contacts you can see the phone or does update by opening mail item you d also see the formation at the bottom as well but this is a great way to surface related information that concludes his video
Minute 14
Thanks for often have a great day
Click here to go to original video page
Tuesday, June 3, 2008
Video: How Do I: Create Adjoining Custom Form Regions in Outlook 2007?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment