msoutlook.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Resize Issue in outlook

 
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Program VBA
Author Message
umasgade



Joined: 31 Jan 2008
Posts: 3

PostPosted: Thu Jan 31, 2008 7:43 am    Post subject: Resize Issue in outlook Reply with quote

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

Archived from group: microsoft>public>outlook>program_vba
Back to top
View user's profile Send private message
Sue Mosher [MVP-Outlook]



Joined: 12 Aug 2007
Posts: 656

PostPosted: Fri Feb 01, 2008 4:40 pm    Post subject: Re: Resize Issue in outlook Reply with quote

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?

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


wrote in message @n20g2000hsh.googlegroups.com...
> 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

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
How to create birthdays like Outlook does? Hello, I`m trying to create birthday appointments the same way like Outlook does if you add a birthday in a contact. With this code I´m not able to do so: Sub Dim As Dim objRecPattern As Outlook.Recu

Forcing Send only - OUTLOOK Hi experts, Is there a way to, using VBA code, to prevent OUTLOOK to receive the messages on the server side when sending mails out? I need to ONLY send mails with OUTLOOK, but NOT receiving. Reason is the use of different mail clients (Outlook Express, M

Problem in outlook addin Hi , I have one outlook-addin and it was working fine with 2003 , it is not working in 2007 . once i click on the add in button outlook is crashing .. and it is crashing in pOuter, dwClsContext,

Synchronize Outlook Appointment Hi, I'm trying to perform between my application and outlook default calendar (which mimic the behavior like ActiveSync) I have face the difficultly on update the appointment with recurrence pattern. let said, I have a appointment with

Email from Word to Outlook Thank you in advance. I'm trying to email a document to Outlook from Word. I have a button in Word that says "Submit". I would like to be able to click that button and it automatically send my Word Doc. to a specific person in Outlook. Can this be done?
Post new topic   Reply to topic    msoutlook.org Forum Index -> Outlook Program VBA All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group