Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / July 2004

Tip: Looking for answers? Try searching our database.

Form changer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bryan Dickerson - 21 Jul 2004 18:10 GMT
Can anyone point me to a program or script (whichever) that will change
custom forms from one form to another?  Another friend pointed me to a copy
of a program from MS that would do it, but the program seems to only work
for the Outlook 2000 client (how ancient!).  I have OL 2002 (XP) and most of
the rest of the company has OL 2003.

Thanx!
Sue Mosher [MVP-Outlook] - 21 Jul 2004 18:45 GMT
See http://www.outlookcode.com/d/newdefaultform.htm#convert
Signature

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

> Can anyone point me to a program or script (whichever) that will change
> custom forms from one form to another?  Another friend pointed me to a copy
[quoted text clipped - 3 lines]
>
> Thanx!
Bryan Dickerson - 22 Jul 2004 15:28 GMT
Sounds like I might need to write my own pgm to do this conversion.

What's involved?  Just opening the item, changing the messageclass and then
saving it?
If an item is defined as needing a custom form to open it with, how do you
open it without the custom form to change the message class?

> See http://www.outlookcode.com/d/newdefaultform.htm#convert
> > Can anyone point me to a program or script (whichever) that will change
[quoted text clipped - 6 lines]
> >
> > Thanx!
Sue Mosher [MVP-Outlook] - 22 Jul 2004 15:49 GMT
That's all there is to it, except you're not "opening" -- i.e. displaying
the item. In any case, Outlook will use the default form for that type of
item if the designated custom form isn't available.

I'm not sure why you feel the need to write your own, but it's a pretty
trivial operation unless you have thousands of items to change (in which
case, you have to batch them to avoid memory leak issues).

Signature

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

> Sounds like I might need to write my own pgm to do this conversion.
>
[quoted text clipped - 4 lines]
>
> > See http://www.outlookcode.com/d/newdefaultform.htm#convert

> > > Can anyone point me to a program or script (whichever) that will change
> > > custom forms from one form to another?  Another friend pointed me to a
[quoted text clipped - 5 lines]
> > of
> > > the rest of the company has OL 2003.
Bryan Dickerson - 22 Jul 2004 16:29 GMT
I have 5 folders, each of which has between 500 and 4000 items apiece.

I tried copying down the ChangeForms.exe, opening it up with WinZip and
installing the .MSI file that is embedded, but I don't know what disk
directory to point it to and I don't understand what it means by "Install
Forms from" either Microsoft Exchange or Microsoft Outlook.

On the other hand, I have written programs before that step down thru a
folder hierarchy and process items in a loop.  It might take a few minutes
to write, but I don't think it would be a major task.  Plus I would learn
from it and have it for future uses.  So the simple outline/design of the
program would be to find the folder, loop thru each item and set the
MessageClass of the item to the name of the new custom form.  Is there a
"save" for each item?

> That's all there is to it, except you're not "opening" -- i.e. displaying
> the item. In any case, Outlook will use the default form for that type of
[quoted text clipped - 24 lines]
> > > of
> > > > the rest of the company has OL 2003.
Sue Mosher [MVP-Outlook] - 22 Jul 2004 18:03 GMT
Yes, there's a Save method. Note that there's at least one script among the
tools I've listed.

Signature

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

> I have 5 folders, each of which has between 500 and 4000 items apiece.
>
[quoted text clipped - 18 lines]
> > trivial operation unless you have thousands of items to change (in which
> > case, you have to batch them to avoid memory leak issues).

> > > Sounds like I might need to write my own pgm to do this conversion.
> > >
[quoted text clipped - 18 lines]
> > > > of
> > > > > the rest of the company has OL 2003.
Bryan Dickerson - 23 Jul 2004 15:19 GMT
I created a test folder of task items and am testing a VB6 program on it,
but everytime I run the test, despite what I put as the new MessageClass,
the MessageClass after the .Save method is always, IPM.Task, instead of what
I want it to be.  I've included the main loop of my code:

   '--- oFldr is a MAPIFolder pointing to my tasks folder
        For i = 1 To oFldr.Items.Count
           oFldr.Items.Item(i).MessageClass = "IPM.Task.NewFormName"
           oFldr.Items.Item(i).Save
           MsgBox "MessageClass is " & oFldr.Items.Item(i).MessageClass
        Next

What am I doing wrong?

> Yes, there's a Save method. Note that there's at least one script among the
> tools I've listed.
[quoted text clipped - 49 lines]
> > > > > of
> > > > > > the rest of the company has OL 2003.
Bryan Dickerson - 23 Jul 2004 19:51 GMT
I think I found the solution.  The modified code is as follows:

        For i = 1 To oFldr.Items.Count
           Set oTask = oFldr.Items.Item(i)
           oTask.MessageClass = "IPM.Task.NewFormName"
           oTask.Save
        Next
Why this works and the other didn't, I don't know, but I'm glad.  Now I have
one more question: I have code in the Item_Write event handler that
generates an email msg.  When I ran my tests, an email was generated and
displayed.  Is there a way besides commenting out the .Display or .Send that
I could tell the task not to execute the Item_Write routine??

Thanx!

> I created a test folder of task items and am testing a VB6 program on it,
> but everytime I run the test, despite what I put as the new MessageClass,
[quoted text clipped - 73 lines]
> > > > > > of
> > > > > > > the rest of the company has OL 2003.
Sue Mosher [MVP-Outlook] - 23 Jul 2004 22:05 GMT
Easier method is to use a For Each loop:

        For Each oTask in oFldr.Items
           oTask.MessageClass = "IPM.Task.NewFormName"
           oTask.Save
        Next

If the form has code in Item_Write, you can't avoid having it run if you
save the item as above. One workaround is to change the form. Another is to
perform the message class update with CDO 1.21, which may not be installed
on your machine, instead of Outlook objects. For a one-time operation like
this, I think I'd just publish the form with the Item_Write code removed
then restore it after resetting the message class with the code above.
Signature

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

> I think I found the solution.  The modified code is as follows:
>
[quoted text clipped - 101 lines]
> > > > > > > of
> > > > > > > > the rest of the company has OL 2003.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.