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 Contacts
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Contact Form Swapping



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 26th 06, 04:31 PM posted to microsoft.public.outlook.contacts
envywaits@gmail.com
external usenet poster
 
Posts: 9
Default Contact Form Swapping

I'm using Outlook 2003 and am trying to find a way to have Outlook open
a selected contact item with a customized form. I already know how to
change the default form for new contacts, and how to programmatically
change the message class of all the existing contact items to use a new
form, but I'm looking for something slightly different. Here's what I
want the end user to be able to do:

1. Select a contact in their contacts list.
2. Click a button on their toolbar that opens the selected contact
with a custom form (assigned in the programming behind the button)

Viewing/Editing a selected contact with a custom form should be
available as an -option-, not a default.

Much appreciated!

--Patrick

Ads
  #2  
Old October 26th 06, 04:35 PM posted to microsoft.public.outlook.contacts
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Contact Form Swapping

You already know the answer, if you think about it: You must change the value of the MessageClass property and save the selected item. Once you do that, you can release the item's object, get it again (use the EntryID), and display it.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
I'm using Outlook 2003 and am trying to find a way to have Outlook open
a selected contact item with a customized form. I already know how to
change the default form for new contacts, and how to programmatically
change the message class of all the existing contact items to use a new
form, but I'm looking for something slightly different. Here's what I
want the end user to be able to do:

1. Select a contact in their contacts list.
2. Click a button on their toolbar that opens the selected contact
with a custom form (assigned in the programming behind the button)

Viewing/Editing a selected contact with a custom form should be
available as an -option-, not a default.

Much appreciated!

--Patrick

  #3  
Old October 26th 06, 05:27 PM posted to microsoft.public.outlook.contacts
envywaits@gmail.com
external usenet poster
 
Posts: 9
Default Contact Form Swapping

Yes, I was very close and thank you for the quick response.

Now, I'm trying to figure a way to reset the message class to the
default when the contact item is closed. Any thoughts?


Sue Mosher [MVP-Outlook] wrote:
You already know the answer, if you think about it: You must change the value of the MessageClass property and save the selected item. Once you do that, you can release the item's object, get it again (use the EntryID), and display it.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
I'm using Outlook 2003 and am trying to find a way to have Outlook open
a selected contact item with a customized form. I already know how to
change the default form for new contacts, and how to programmatically
change the message class of all the existing contact items to use a new
form, but I'm looking for something slightly different. Here's what I
want the end user to be able to do:

1. Select a contact in their contacts list.
2. Click a button on their toolbar that opens the selected contact
with a custom form (assigned in the programming behind the button)

Viewing/Editing a selected contact with a custom form should be
available as an -option-, not a default.

Much appreciated!

--Patrick


  #4  
Old October 26th 06, 05:29 PM posted to microsoft.public.outlook.contacts
envywaits@gmail.com
external usenet poster
 
Posts: 9
Default Contact Form Swapping

Nevermind, I got it! I'll post the code shortly.

wrote:
Yes, I was very close and thank you for the quick response.

Now, I'm trying to figure a way to reset the message class to the
default when the contact item is closed. Any thoughts?


Sue Mosher [MVP-Outlook] wrote:
You already know the answer, if you think about it: You must change the value of the MessageClass property and save the selected item. Once you do that, you can release the item's object, get it again (use the EntryID), and display it.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
I'm using Outlook 2003 and am trying to find a way to have Outlook open
a selected contact item with a customized form. I already know how to
change the default form for new contacts, and how to programmatically
change the message class of all the existing contact items to use a new
form, but I'm looking for something slightly different. Here's what I
want the end user to be able to do:

1. Select a contact in their contacts list.
2. Click a button on their toolbar that opens the selected contact
with a custom form (assigned in the programming behind the button)

Viewing/Editing a selected contact with a custom form should be
available as an -option-, not a default.

Much appreciated!

--Patrick


  #5  
Old October 26th 06, 05:58 PM posted to microsoft.public.outlook.contacts
envywaits@gmail.com
external usenet poster
 
Posts: 9
Default Contact Form Swapping

Here's what I came up with. I set up a button on the toolbar. It
takes a selected contact, swaps out the message class so it will
display using a custom form, then resets the message class so persons
who do not need or care to use the custom form won't be troubled by it.

Sub CustomFormViewer()
Dim objApp As Application
Dim objItem As Object

Set objApp = CreateObject("Outlook.Application")
Set objItem = objApp.ActiveExplorer.Selection.Item(1)

If objItem.Class = olContact Then
objItem.MessageClass = "IPM.Contact.CC_ContactForm02"
objItem.Save
Set objItem = objApp.ActiveExplorer.Selection.Item(1)
objItem.Display
objItem.MessageClass = "IPM.Contact"
objItem.Save
End If

Set objItem = Nothing
Set objApp = Nothing

End Sub




wrote:
Nevermind, I got it! I'll post the code shortly.

wrote:
Yes, I was very close and thank you for the quick response.

Now, I'm trying to figure a way to reset the message class to the
default when the contact item is closed. Any thoughts?


Sue Mosher [MVP-Outlook] wrote:
You already know the answer, if you think about it: You must change the value of the MessageClass property and save the selected item. Once you do that, you can release the item's object, get it again (use the EntryID), and display it.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
I'm using Outlook 2003 and am trying to find a way to have Outlook open
a selected contact item with a customized form. I already know how to
change the default form for new contacts, and how to programmatically
change the message class of all the existing contact items to use a new
form, but I'm looking for something slightly different. Here's what I
want the end user to be able to do:

1. Select a contact in their contacts list.
2. Click a button on their toolbar that opens the selected contact
with a custom form (assigned in the programming behind the button)

Viewing/Editing a selected contact with a custom form should be
available as an -option-, not a default.

Much appreciated!

--Patrick


 




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 to replace Default Contact form with Customised conact form using VBScript code Satish Boddapati Outlook - Using Contacts 0 October 12th 06 08:20 AM
How to replace Default Contact form with Customised conact form us Satish Boddapati Outlook - Installation 0 October 12th 06 08:20 AM
How to replace Default Contact form with Customised conact form using VBScript code Satish Boddapati Outlook - Installation 0 October 12th 06 08:19 AM
When swapping timezones, each ALL DAY event now crosses 2 days. susanmarie Outlook - Calandaring 2 October 2nd 06 05:55 PM
OL2003 - can you auto-fill a singel new contact form with online form data TimR Outlook - Using Contacts 1 February 15th 06 01:43 PM


All times are GMT +1. The time now is 11:07 PM.


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.