Thread: Version
View Single Post
  #2  
Old March 23rd 06, 06:16 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Version

The code you have can be run from any Office program VBA environment.

Did you publish the new form under a different name? Or did you just change the version number and use the same message class?

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

"Josianne" wrote in message ...
Ok, I've found the code that will help me to do it but I juste don't know
where to put it :\
Sub changeMessageClass()
Set olApp = New Outlook.Application
Set OlNs = olApp.GetNameSpace("MAPI")
Set TasksFolder = olNs.GetDefaultFolder(olFolderTasks)
Set TasksItems = TasksFolder.Items
For Each Itm in TasksItems
If Itm.MessageClass "IPM.Task.MyForm" Then
Itm.MessageClass = "IPM.Task.MyForm"
Itm.Save
End If
Next
End Sub

--
Josianne


"Sue Mosher [MVP-Outlook]" wrote:

You'll need to run a script or VBA code to change the value of the MessageClass property of the existing items to point to the class of your new published form.

"Josianne" wrote in message ...
Hi, my problem it's taht I have some old completed froms. they were build
with one of my first version of form. Now, I have a new form and I want my
old forms with my new form template. But I'm not abble to do it!
Thanks,

Josianne


Ads