S
sublimese
I have created a custom form and published it in an Organizational
Forms Library. I have used FormsAdmin to create registry entries that
forces outlook to use my custom form by default. If I create a new
item using my custom form OR open an existing item, outlook downloads
my custom form from the OFL and uses it properly.
The problem occurs when opening an existing outlook item through my
addin. When I use my addin to programmatically open an existing item
that outlook should open with my custom form, 1 of 2 things happen:
1) If the custom form is not cached on the local machine, outlook does
not download the custom form, but instead opens outlooks default form.
(however if I open the same item by double clicking it in the outlook
interface, my custom form is downloaded and used properly)
2) If the custom form IS in the local cache, outlook displays the item
using my custom form, but NONE of the vbs code associated with the form
runs. (i.e. I have added a button to my custom form, and when it opens
in this way, the button click is not fired)
Again, this behavior ONLY occurs when trying to open existing items
programmatically through the addin. If I open the existing items by
double clicking on them in Outlook everything happens as it should.
My addin is written in c#. I have tried to open the items using 2
methods, each give the same behavior:
method 1:
OutlookRef.ContactItem currentItem = null;
//get the item using "GetItemFromID" (passing the entryID and storeID I
obtained earlier)
OutlookRef.NameSpace session =
m_OutlookApplicationObject.GetNamespace("MAPI");
currentItem = (OutlookRef.ContactItem)session.GetItemFromID(entryID,
storeID);
currentItem.Display();
method 2:
OutlookRef.ContactItem currentItem = null;
//get the item using "GetItemFromID" (passing the entryID and storeID I
obtained earlier)
OutlookRef.NameSpace session =
m_OutlookApplicationObject.GetNamespace("MAPI");
currentItem = (OutlookRef.ContactItem)session.GetItemFromID(entryID,
storeID);
OutlookRef.Inspector objInspector =
m_OutlookApplicationObject.Inspectors.Add(currentItem);
objInspector.Activate();
If anyone could shed some light on this I would be most appreciative.
Thank you
Kelly Johnson
Forms Library. I have used FormsAdmin to create registry entries that
forces outlook to use my custom form by default. If I create a new
item using my custom form OR open an existing item, outlook downloads
my custom form from the OFL and uses it properly.
The problem occurs when opening an existing outlook item through my
addin. When I use my addin to programmatically open an existing item
that outlook should open with my custom form, 1 of 2 things happen:
1) If the custom form is not cached on the local machine, outlook does
not download the custom form, but instead opens outlooks default form.
(however if I open the same item by double clicking it in the outlook
interface, my custom form is downloaded and used properly)
2) If the custom form IS in the local cache, outlook displays the item
using my custom form, but NONE of the vbs code associated with the form
runs. (i.e. I have added a button to my custom form, and when it opens
in this way, the button click is not fired)
Again, this behavior ONLY occurs when trying to open existing items
programmatically through the addin. If I open the existing items by
double clicking on them in Outlook everything happens as it should.
My addin is written in c#. I have tried to open the items using 2
methods, each give the same behavior:
method 1:
OutlookRef.ContactItem currentItem = null;
//get the item using "GetItemFromID" (passing the entryID and storeID I
obtained earlier)
OutlookRef.NameSpace session =
m_OutlookApplicationObject.GetNamespace("MAPI");
currentItem = (OutlookRef.ContactItem)session.GetItemFromID(entryID,
storeID);
currentItem.Display();
method 2:
OutlookRef.ContactItem currentItem = null;
//get the item using "GetItemFromID" (passing the entryID and storeID I
obtained earlier)
OutlookRef.NameSpace session =
m_OutlookApplicationObject.GetNamespace("MAPI");
currentItem = (OutlookRef.ContactItem)session.GetItemFromID(entryID,
storeID);
OutlookRef.Inspector objInspector =
m_OutlookApplicationObject.Inspectors.Add(currentItem);
objInspector.Activate();
If anyone could shed some light on this I would be most appreciative.
Thank you
Kelly Johnson