Resize Issue in outlook

U

umasgade

My custom compose form have Message control on the left side & my
activex control on the right side (alongwith To, CC on the upper
part). I have set "Resize with layout" property of Message control to
unchecked. I want to resize my activex control to the width of
inspector. So I tried to set "Resize with layout" property of my
activex control to checked, but that didn't work. I have also tried
code snippet from MS site, but it also failed. Code snippet for office
2007 is as follows -

Dim olkCtrl As Outlook.OlkControl
olkCtrl =
CurrentInsp.ModifiedFormPages("Message").Controls("IE1")
olkCtrl.EnableAutoLayout = True
olkCtrl.HorizontalLayout =
Outlook.OlHorizontalLayout.olHorizontalLayoutGrow
olkCtrl.VerticalLayout =
Outlook.OlVerticalLayout.olVerticalLayoutGrow

My aim is, my compose mail's Message control is of fixed size & I want
to resize my activex control viz. IE1 to the height & width of form. I
am using VSTO/ vb 2005 for office 2003 & 2007.

I also tried the following code snippet in outlook 2003 with sp3 and
it work fine but for outlook 2007,my message control shrink down.

sub item_Write
Item.GetInspector.ModifiedFormPages("Message").IE1.LayoutFlags = 68
end sub


Please help me.

Thanks in advance
 
S

Sue Mosher [MVP-Outlook]

EnableAutoLayout, HorizontalLayout, and VerticalLayout are properties that apply to the OlkControl base class for the new Olk* controls for Outlook 2007 form regions. As the Help topic for the OlkControl class explains, its member properties do not apply to Forms 2.0 controls, which is what you're apparently using, given your code below. If you're building a VSTO add-in for Outlook 2007, why not move to form regions?
 

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