Automated adding of views and categories

M

mocad_tom

I must create a script which adds categories and views to the calendar
in outlook. I want to have as much compatibility as
possible(97,2000,2002,XP). My first approach is to deploy a .pst-file.
So I created one with outlook97.
Then
addstore
copyto
removestore
as it was recommended.

But there were no new categories or views created.
 
K

Ken Slovak - [MVP - Outlook]

AddStore and RemoveStore aren't available in Outlook 97, they were
introduced in Outlook 2000.

Categories are kept in each user's Windows registry. Your script would
have to write to the registry. In Outlook 2002 and later the
Categories master list in the registry isn't a string value it's a
binary and all the categories are in Unicode, so you'd also have to
account for that in your script.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
M

mocad_tom

I already have a COM-Addin running which can add categories.

My main problem is to create the views.
They are very simple views. Only a weekly-report in the calendar which
shows the items of one category.

Where are the views in outlook97 stored?
Do I have to determine which version is installed?
Or is there another way to create it, perhaps through COM?
 
M

mocad_tom

If there is no way to be compatible with Outlook97, then forget OL97.
I need this to automate the setup, everyone who has OL97 has to
configure it without automation.
Let's concentrate on Outlook2k and OL2002.
Can I solve this problem with only one .pst-file for both or should I
use a .pst-file for OL2K and a vba script for creating the views for
OL2002.

Please help me, I'm not very experienced in VB-programming and
outlook.
Thanks in advance!
Tom
 
K

Ken Slovak - [MVP - Outlook]

Please include some of the preceding thread in your posts, it makes it
very hard to follow a thread without that.

Forget COM addins if you want to support Outlook 97 or 98, COM addins
were introduced in Outlook 2000.

Views are kept in a hidden MAPI message in the folders, using the
MessageClass of IPM.Microsoft.FolderDesign.NamedView. See
http://www.cdolive.com/cdo10.htm for information about that. The
format of the view is an undocumented binary so I'd give up on the
idea of trying to create a view using code. You also can't access the
view message using the Outlook object model, you'd have to use CDO
1.21 or Extended MAPI (C++ or Delphi only, no VB/VBA/VBScript).

See http://www.slipstick.com/dev/copyfolderdesign.htm for your options
for distributing views.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
M

mocad_tom

This hints assumes that you have exchange server installed, as far as
I can see. But our customers use their outlook as mail-client and
calendar without any central point of communication.
I don't have the "Copy Folder Design" option in my menu.
This is perhaps the reason why the addstore-copyto-sample don't add
any views.

Can I make a workaround? Can I activate this feature without
installing exchange?

Thank you!
Tom

Ken Slovak - said:
Please include some of the preceding thread in your posts, it makes it
very hard to follow a thread without that.

Forget COM addins if you want to support Outlook 97 or 98, COM addins
were introduced in Outlook 2000.

Views are kept in a hidden MAPI message in the folders, using the
MessageClass of IPM.Microsoft.FolderDesign.NamedView. See
http://www.cdolive.com/cdo10.htm for information about that. The
format of the view is an undocumented binary so I'd give up on the
idea of trying to create a view using code. You also can't access the
view message using the Outlook object model, you'd have to use CDO
1.21 or Extended MAPI (C++ or Delphi only, no VB/VBA/VBScript).

See http://www.slipstick.com/dev/copyfolderdesign.htm for your options
for distributing views.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


mocad_tom said:
I already have a COM-Addin running which can add categories.

My main problem is to create the views.
They are very simple views. Only a weekly-report in the calendar which
shows the items of one category.

Where are the views in outlook97 stored?
Do I have to determine which version is installed?
Or is there another way to create it, perhaps through COM?
 
K

Ken Slovak - [MVP - Outlook]

Did you follow the link on the Web page at Slipstick to
http://www.exchangeadmin.com/Articles/Index.cfm?ArticleID=8650 and
look at the second method? That's about your only option.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 
M

mocad_tom

This works and I tried it yesterday but I didn't see any way to
automate this with a script. In OL2002 you can reach the view
seperately but in OL2000? Can you help me?
I hope that's my last question and the problem is solved soon.
Thanks for the great help you have given me!
Tom



Ken Slovak - said:
Did you follow the link on the Web page at Slipstick to
http://www.exchangeadmin.com/Articles/Index.cfm?ArticleID=8650 and
look at the second method? That's about your only option.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm

mocad_tom said:
This hints assumes that you have exchange server installed, as far as
I can see. But our customers use their outlook as mail-client and
calendar without any central point of communication.
I don't have the "Copy Folder Design" option in my menu.
This is perhaps the reason why the addstore-copyto-sample don't add
any views.

Can I make a workaround? Can I activate this feature without
installing exchange?

Thank you!
Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top