views:

189

answers:

0

I am programming Outlook 2003 using Visual Studio 2008.

Add-in uses embedded user control in folder's home page, exactly as it was recommended. Here is HTML code that is using:

<html><head><style type="text/css">body{overflow: hidden}</style></head>
<body rightmargin = '0' leftmargin ='0' topmargin ='0' bottommargin = '0'
onload='OnBodyLoad()'>
<script>
function OnBodyLoad()
{
var outlook = window.external.OutlookApplication;
FolderView.Initialize(outlook);
}
</script>
<object classid='clsid:C718A848-6C31-4897-8DA8-0EDE3A4C6F14'
id='FolderView' VIEWASTEXT width='100%' height='100%' />
</body>
</html>

I am inserting HTML code in HTMLDocument property of the active explorer in its FolderSwitch event.

In OnLoad event of the control, a reference to application instance is used (which was passed as a parameter in its Initialize method), but sometimes control is not initialized before OnLoad event is fired. It is just created, but Initialize method is never invoked.

Does somebody has similar experiences? Is this usual behavior?