A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to change focus to added address card



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 30th 08, 04:43 PM posted to microsoft.public.outlook.program_forms
Boein
external usenet poster
 
Posts: 18
Default How to change focus to added address card

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  
Old May 30th 08, 04:48 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to change focus to added address card

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  
Old May 31st 08, 12:55 AM posted to microsoft.public.outlook.program_forms
Boein
external usenet poster
 
Posts: 18
Default How to change focus to added address card

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  
Old May 31st 08, 01:10 AM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to change focus to added address card

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  
Old June 2nd 08, 09:25 AM posted to microsoft.public.outlook.program_forms
Boein
external usenet poster
 
Posts: 18
Default How to change focus to added address card

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  
Old June 2nd 08, 01:53 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to change focus to added address card

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 11:10 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.