![]() |
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
|
|||
|
|||
![]()
Hi,
Using modified contact forms with vbs. After adding a contact from a contact the focus is still set on the previous contact if you look at the selected address cards. How can you set the focus on the added contact. Thanks Boein |
#2
|
|||
|
|||
![]()
You can't. Outlook provides no method for selecting a particular item in a folder view.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Boein" wrote in message ... Hi, Using modified contact forms with vbs. After adding a contact from a contact the focus is still set on the previous contact if you look at the selected address cards. How can you set the focus on the added contact. Thanks Boein |
#3
|
|||
|
|||
![]()
OK then what happens if you're running a form from a folder and you want to
add a new one from within this form. If I do this the same data is in the new form and the first form. What am I doing wrong. This is what I want. A folder with a collection of custom forms (ie modified contact-items). Each form contains vbs and has a combobox and contact fields. This combobox contains all the forms in the folder. If I select an item from this combobox the corresponding form should be openend showing corresponding data in the fields. If I chage a value in one of the fields and press a save button the corresponding form shown in the combobox should be updated. Sounds easy, but is not ;-) Regards Boein "Sue Mosher [MVP-Outlook]" wrote: You can't. Outlook provides no method for selecting a particular item in a folder view. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Boein" wrote in message ... Hi, Using modified contact forms with vbs. After adding a contact from a contact the focus is still set on the previous contact if you look at the selected address cards. How can you set the focus on the added contact. Thanks Boein |
#4
|
|||
|
|||
![]()
I'm confused over whether you mean "form" and "item" in your description of the contents of the combo box. A form is a code/UI template. It contains no data, although it may have default values for certain fields. An item is the unit of data storage. It is linked to a particular form through the value of its MessageClass property.
So are you talking about published custom forms? Or are you talking about creating new items from existing items (which may or may not be using a custom form)? Or something else completely? To create a new item that uses a custom form for its UI and code, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") If it's a message form, use the Drafts folder as the target. If the target is a default folder, you can use the Namespace.GetDefaultFolder method to return it as a MAPIFolder object. To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the MAPIFolder Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. To create a new item that is a copy of an existing item, call the Copy method on the item you want to copy: Set newItem = oldItem.Copy -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Boein" wrote in message ... OK then what happens if you're running a form from a folder and you want to add a new one from within this form. If I do this the same data is in the new form and the first form. What am I doing wrong. This is what I want. A folder with a collection of custom forms (ie modified contact-items). Each form contains vbs and has a combobox and contact fields. This combobox contains all the forms in the folder. If I select an item from this combobox the corresponding form should be openend showing corresponding data in the fields. If I chage a value in one of the fields and press a save button the corresponding form shown in the combobox should be updated. Sounds easy, but is not ;-) Regards Boein "Sue Mosher [MVP-Outlook]" wrote: You can't. Outlook provides no method for selecting a particular item in a folder view. "Boein" wrote in message ... Hi, Using modified contact forms with vbs. After adding a contact from a contact the focus is still set on the previous contact if you look at the selected address cards. How can you set the focus on the added contact. Thanks Boein |
#5
|
|||
|
|||
![]()
Hi Sue,
Form and item is exactly like you discribed. The combobox in the form should be filled dynamicaly when the form is started the form should read a field of all the other forms and add this field to the combobox. When the loop is done the combobox is filled and you should be able to select and item from it and this wil result in displaying the corresponding form. "Sue Mosher [MVP-Outlook]" wrote: I'm confused over whether you mean "form" and "item" in your description of the contents of the combo box. A form is a code/UI template. It contains no data, although it may have default values for certain fields. An item is the unit of data storage. It is linked to a particular form through the value of its MessageClass property. So are you talking about published custom forms? Or are you talking about creating new items from existing items (which may or may not be using a custom form)? Or something else completely? To create a new item that uses a custom form for its UI and code, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") If it's a message form, use the Drafts folder as the target. If the target is a default folder, you can use the Namespace.GetDefaultFolder method to return it as a MAPIFolder object. To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the MAPIFolder Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. To create a new item that is a copy of an existing item, call the Copy method on the item you want to copy: Set newItem = oldItem.Copy -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Boein" wrote in message ... OK then what happens if you're running a form from a folder and you want to add a new one from within this form. If I do this the same data is in the new form and the first form. What am I doing wrong. This is what I want. A folder with a collection of custom forms (ie modified contact-items). Each form contains vbs and has a combobox and contact fields. This combobox contains all the forms in the folder. If I select an item from this combobox the corresponding form should be openend showing corresponding data in the fields. If I chage a value in one of the fields and press a save button the corresponding form shown in the combobox should be updated. Sounds easy, but is not ;-) Regards Boein "Sue Mosher [MVP-Outlook]" wrote: You can't. Outlook provides no method for selecting a particular item in a folder view. "Boein" wrote in message ... Hi, Using modified contact forms with vbs. After adding a contact from a contact the focus is still set on the previous contact if you look at the selected address cards. How can you set the focus on the added contact. Thanks Boein |
#6
|
|||
|
|||
![]()
Did you try the code I suggested for creating a new item using a custom form?
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Boein" wrote in message ... Hi Sue, Form and item is exactly like you discribed. The combobox in the form should be filled dynamicaly when the form is started the form should read a field of all the other forms and add this field to the combobox. When the loop is done the combobox is filled and you should be able to select and item from it and this wil result in displaying the corresponding form. "Sue Mosher [MVP-Outlook]" wrote: I'm confused over whether you mean "form" and "item" in your description of the contents of the combo box. A form is a code/UI template. It contains no data, although it may have default values for certain fields. An item is the unit of data storage. It is linked to a particular form through the value of its MessageClass property. So are you talking about published custom forms? Or are you talking about creating new items from existing items (which may or may not be using a custom form)? Or something else completely? To create a new item that uses a custom form for its UI and code, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") If it's a message form, use the Drafts folder as the target. If the target is a default folder, you can use the Namespace.GetDefaultFolder method to return it as a MAPIFolder object. To create an item in another person's mailbox, use Namespace.GetSharedDefaultFolder to get the MAPIFolder Otherwise, you can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. To create a new item that is a copy of an existing item, call the Copy method on the item you want to copy: Set newItem = oldItem.Copy "Boein" wrote in message ... OK then what happens if you're running a form from a folder and you want to add a new one from within this form. If I do this the same data is in the new form and the first form. What am I doing wrong. This is what I want. A folder with a collection of custom forms (ie modified contact-items). Each form contains vbs and has a combobox and contact fields. This combobox contains all the forms in the folder. If I select an item from this combobox the corresponding form should be openend showing corresponding data in the fields. If I chage a value in one of the fields and press a save button the corresponding form shown in the combobox should be updated. Sounds easy, but is not ;-) Regards Boein "Sue Mosher [MVP-Outlook]" wrote: You can't. Outlook provides no method for selecting a particular item in a folder view. "Boein" wrote in message ... Hi, Using modified contact forms with vbs. After adding a contact from a contact the focus is still set on the previous contact if you look at the selected address cards. How can you set the focus on the added contact. Thanks Boein |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
how do I change the way an address card looks in Contacts | Surendra | Outlook - Using Contacts | 1 | December 1st 07 10:10 AM |
Change field order in address card list | Stumped | Outlook - Using Contacts | 0 | December 10th 06 09:16 PM |
Change color of contact banner in Address Card view | Trakker | Outlook - Using Contacts | 0 | June 7th 06 04:01 PM |
Change background colors on Contact address card view? | TeaneckTom | Outlook - Using Contacts | 1 | April 8th 06 10:43 PM |
How is a field added to the general card for contracts in Outlook | Dwight in Georgia | Outlook - Using Contacts | 1 | March 13th 06 01:45 PM |