Re: Force user to use outlook and custom organizational form
From: hint (legend_hint_at_yahoo.com)
Date: 02/13/04
- Next message: hint: "Re: Force user to use outlook and custom organizational form"
- Previous message: Chris R: "Ignoring client time zone in OWA public calendar - Possible?"
- In reply to: Ken Slovak - [MVP - Outlook]: "Re: Force user to use outlook and custom organizational form"
- Next in thread: Ken Slovak - [MVP - Outlook]: "Re: Force user to use outlook and custom organizational form"
- Reply: Ken Slovak - [MVP - Outlook]: "Re: Force user to use outlook and custom organizational form"
- Messages sorted by: [ date ] [ thread ]
Date: 12 Feb 2004 20:32:58 -0800
"Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> wrote in message news:<#LUKGHX8DHA.2524@TK2MSFTNGP11.phx.gbl>...
> Depending on the version and build of Outlook you may or may not get a
> NewInspector event when:
> a) a WordMail item is opened.
> b) the user presses the Next or Previous buttons in an open Inspector,
> therefore displaying a different item in the existing Inspector.
Thanks for the info =) , I am using Outlook 2003 and the above
scenarios seems to be handled properly. (keeping my fingers crossed)
>
> In addition, when the user has more than one Inspector opened at the
> same time you need to use an Inspector wrapper collection made up of
> custom classes that handle whatever events you want to handle for
> items in the Inspectors. That way you can handle events from
> individual items. A number of Inspector wrappers have been posted in
> the Outlook programming newsgroups, you can Google for the code for
> one. The ItemsCB COM addin example on the Resources page at
> www.microeye.com also shows an Explorer wrapper that can be modified
> to be used as an Inspector wrapper. In addition, ItemsCB shows best
> practices for an Outlook COM addin and necessary workarounds for
> various bugs such as On_Disconnection not firing when the user closes
> Outlook.
Thank God I only have to handle the Item_Read event. :X
The other events are handles by the custom form, my approach is to
have a custom form to handle all messages, with the COM Addin ensuring
only that the custom form has been installed and has not been
overwritten. (I check the registry entry under
HKCU\Software\Classes\CLSID\ to see that the GUID of my custom form is
present, I also check that the message class name is correct, and
there is only one entry with such name, since my form is an
Organizational Form published in a Organization Form Library, I can be
sure that my form is being used., I also check the registry under
HKCU\Software\Microsoft\Office\11.0\Outlook\Custom forms\Read to
ensure that there are no entries there that could substitute my custom
message class), Do you think the checkings are enough? I'm really not
sure that these are the correct places to check and that there are no
other scenarios that were not handle.
>
> Any newly created item, whether it's a new message or a reply or a
> forward will have an EntryID = "", Size = 0 depends on the item. Size
> = 0 is valid for newly created items.
Yes, EntryID, why didn't I thought of that :D .. thanks
>
> If a mailing list or DL was used to send an original message then the
> Recipients collection of the item will have more than one Recipient.
> You should always check for Recipients.Count and iterate the
> Recipients collection if there is more than one Recipient.
Does this mean that the recipient email address will still start with
EX:?
>
> You should not add controls to display properties to an Outlook form
> in your code. Controls added on the fly to a form one-offs the form
> which increases the form size and can cause many other problems. If
> you need to display custom fields in a form you should create a custom
> form with a custom MessageClass and use that to display the fields.
> Just remember to bind the controls to the custom user properties and
> add them to the fields in the folder if you ever want to display those
> fields in a custom table type view.
The problem with custom forms is that when it is sent to a non-outlook
user, the attachments cannot be viewed, (since it becomse
winmail.dat), specially if the message is Signed or Encrypted.(I've
tested this many times and has so far found no way of solving this
problem).
My current approach is to disable the default Reply, Reply to All and
Forward, and provide custom actions on the form to do these, but with
separate buttons for recipients that uses Outlook and recipients who
don't. Any better suggestions?
>
> Also, custom Outlook forms will only transport correctly to other
> people if the form is sent in RTF format and the form has been
> published in the recipient's system somewhere like an Organizational
> Forms Library, a Personal Forms Library or a shared folder like a
> public folder.
I would only want the custom form to be intact when
replying/sending/forwarding to internal users who I am sure are using
Outlook2003, and send only plain text to External users. Any quick
solutions?
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
Thanks for you reply.
Best Regards,
Zhen
>
>
> "hint" <legend_hint@yahoo.com> wrote in message
> news:3eda2acc.0402111945.3202aeb3@posting.google.com...
> > "Siegfried Weber" <siegfriedcw@notmail.com> wrote in message
> news:<#Lkpv7w7DHA.3648@TK2MSFTNGP11.phx.gbl>...
> > > hint wrote:
> > > >
> > > > Agreed :), been trying the COM add-ins lately, however, have
> some
> > > > issues that I cannot resolve yet.
>
> > > :-(
>
> > > > 1. Is trapping the New_Inspector event sufficient enough to
> handle all
> > > > possible scenarios of opening a message?
> > >
> > > AFAIK, yes.
> > Been testing it, you're right :)
> >
> > >
> > > > If yes, how do I know whether the user is trying to read or to
> compose?
> > >
> > > Check the item.size. If zero it's a new item.
> > but how about forwarded mail? or replies? are they also zero?
> sorry..
> > haven't test it yet :P (thought of saving some time by asking
> instead
> > :P lazy me..)
>
> > >
> > > > And whether the message does
> > > > come from the exchange server? (i.e. what if user has more than
> 1
> > > > account profile)
> > >
> > > By checking the recipient address. If it starts with "EX:" it's an
> Exchange
> > > mail.
> > but what if the recipient is part of a mailing list?
> >
> > >
> > > > 2. Is there a way to cancel the New_Inspector action? e.g. If
> some
> > > > registry keys are not present, then user won't be able to
> proceed.
> > >
> > > Ouch. I'm afraid I don't know offhand and would need to check the
> Outlook
> > > Object Model documentation. In any case: just check with the
> object browser
> > > should bring it up ;-)
> > seems there is no way to cancel the event, what I did was to capture
> > the new_inspector then override the item's onopen event handler with
> > the checking code, if it fails, I cancel the open event instead.
> >
> > I think I have handle the events correctly now, but part of my
> > requirement was to show two custom fields to the user. I guess I
> could
> > use custom forms for that purpose, but I was thinking whether it is
> > possible to show some custom fields in the default form and have
> them
> > intact when replying or forwarding?
> >
> > I tried modifying the form using something similar to below:
> >
> > ..
> > 'oItem is the active mailitem in an item_open event
> > set oPage = oItem.GetInspector.ModifiedFormPages.add ("Message")
> > set oCtrl = oPage.Controls.add ("Forms.Label.1","ID",true)
> > oCtrl.left = oPage.Controls("Subject").left
> > oCtrl.top = oPage.Controls("Message").top
> > oPage.Controls("Message").top =oPage.Controls("Message").top + 25
> > oItem.UserProperties.add "ID",olString
> > oItem.UserProperties("ID").value = oItem.EntryID
> > oCtrl.caption = oItem.UserProperties("ID").value
> > ..
> >
> > However, when user replies to this message, the user property "ID"
> no
> > longer exists. In addition, the code only works for Plain Emails. If
> > oItem is a SMIME message, then the call to .add("Message") causes
> > error in outlook and the application terminates. Any ideas?
> >
> > >
> > > > Thanks again for your time and help.
> > >
> > > You are welcome.
>
> > :)
> >
> > Best Regards,
> > Zhen
- Next message: hint: "Re: Force user to use outlook and custom organizational form"
- Previous message: Chris R: "Ignoring client time zone in OWA public calendar - Possible?"
- In reply to: Ken Slovak - [MVP - Outlook]: "Re: Force user to use outlook and custom organizational form"
- Next in thread: Ken Slovak - [MVP - Outlook]: "Re: Force user to use outlook and custom organizational form"
- Reply: Ken Slovak - [MVP - Outlook]: "Re: Force user to use outlook and custom organizational form"
- Messages sorted by: [ date ] [ thread ]