none
Disable Minimize Button in Outlook compose Window RRS feed

  • Question

  • I am Running Windows Application in which i am using E-Mail Sending option. For this purpose , i took help of Outlook Application object.But using this a window display having minimize button disabled. I don't know why it is disable. I want to know the reason for this and also interested to know the way to resolve this Bug.

    Any suggestion will be appretiated.

    Thanks


    Tuesday, April 30, 2013 10:34 AM

Answers

  • That code is Outlook automation code, not Simple MAPI code. So the answer Dmitry gave you is the correct one.
     
    If you were using Simple MAPI (Send To from Word uses it, among other programs) any email opened would be opened modally and could not be minimized. There are no workarounds for that.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Programming_Lover" <=?utf-8?B?UHJvZ3JhbW1pbmdfTG92ZXI=?=> wrote in message news:e3306b4a-aec7-4beb-a684-824b757bc5b8...

    Thanx for being replying Ken Slovak over my post.

    Actually i am not using Outlook automation code i am using simple MAPI to send my E-Mail.

    Here is my Code :

    // email
     Outlook.Application outlookApp = new Outlook.Application();

     //Create the new message .
     Outlook.MailItem outlookMsg = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType..olMailItem);

     // default parameters
     outlookMsg.Subject = tbsubject.Text; // subject
     outlookMsg.To = tbEmail.Text;// To
     outlookMsg.CC = tbEmailCc.Text; // Cc
     

    // close the loading window
    loadingWindow.Dispose();

    this.Enabled = true;
     outlookMsg.Display(true);
    outlookMsg = null;

    outlookApp=null;

    I am using the code as above. Also i am using Outlook Version 2010.


    Ken Slovak MVP - Outlook
    Wednesday, May 1, 2013 1:51 PM
    Moderator

All replies

  • Are you using Outlook automation code or using Simple MAPI to send your email?
     
    If you are using automation, are you opening an Outlook Inspector item or MailItem modally?
     
    Show the code you're using so someone can figure out what's going on. It's sort of hard to tell from your post. Also, state your Outlook version and if the Windows application is supposed to run as a service or unattended.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Aashiq" <=?utf-8?B?QWFzaGlx?=> wrote in message news:4d546d62-b8ef-4948-8029-4d58d0ab1d2e...

    I am Running Windows Application in which i am using E-Mail Sending option. For this purpose , i took help of Outlook Application object.But using this a window display having minimize button disabled. I don't know why it is disable. I want to know the reason for this and also interested to know the way to resolve this Bug.

    Any suggestion will be appretiated.

    Thanks



    Ken Slovak MVP - Outlook
    Tuesday, April 30, 2013 2:12 PM
    Moderator
  • What is your code? Are you displaying the message modally (MailItem.Display(true)) by any chance?

    Modal windows cannot be minimized.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Tuesday, April 30, 2013 5:24 PM
  • Thanx for being replying Ken Slovak over my post.

    Actually i am not using Outlook automation code i am using simple MAPI to send my E-Mail.

    Here is my Code :

    // email
     Outlook.Application outlookApp = new Outlook.Application();

     //Create the new message .
     Outlook.MailItem outlookMsg = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType.olMailItem);

     // default parameters
     outlookMsg.Subject = tbsubject.Text; // subject
     outlookMsg.To = tbEmail.Text;// To
     outlookMsg.CC = tbEmailCc.Text; // Cc
     

    // close the loading window
    loadingWindow.Dispose();

    this.Enabled = true;
     outlookMsg.Display(true);
    outlookMsg = null;

    outlookApp=null;

    I am using the code as above. Also i am using Outlook Version 2010.

    Wednesday, May 1, 2013 5:46 AM
  • Thanks for Giving Reply Dmitry

    Here is my Code :

    // email
     Outlook.Application outlookApp = new Outlook.Application();

     //Create the new message .
     Outlook.MailItem outlookMsg = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType.olMailItem);

     // default parameters
     outlookMsg.Subject = tbsubject.Text; // subject
     outlookMsg.To = tbEmail.Text;// To
     outlookMsg.CC = tbEmailCc.Text; // Cc
     

    // close the loading window
    loadingWindow.Dispose();

    this.Enabled = true;
     outlookMsg.Display(true);
    outlookMsg = null;

    outlookApp=null;

    I am using the code as above. Also i am using Outlook Version 2010.

    And Yeah I am using the MailItem Object to displaying the message.

    If I believe that i am trying to display the code Modally. AlsoModally Window Cannot be minimized.

    Then What is the another way to display the message?

    Also tell me what code I should use , so that My minimize Button Work??

    Thanx

    Vishal Aggarwal

    Wednesday, May 1, 2013 5:53 AM
  • Change

    outlookMsg.Display(true);

    to

    outlookMsg.Display(false);


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Wednesday, May 1, 2013 12:44 PM
  • That code is Outlook automation code, not Simple MAPI code. So the answer Dmitry gave you is the correct one.
     
    If you were using Simple MAPI (Send To from Word uses it, among other programs) any email opened would be opened modally and could not be minimized. There are no workarounds for that.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Programming_Lover" <=?utf-8?B?UHJvZ3JhbW1pbmdfTG92ZXI=?=> wrote in message news:e3306b4a-aec7-4beb-a684-824b757bc5b8...

    Thanx for being replying Ken Slovak over my post.

    Actually i am not using Outlook automation code i am using simple MAPI to send my E-Mail.

    Here is my Code :

    // email
     Outlook.Application outlookApp = new Outlook.Application();

     //Create the new message .
     Outlook.MailItem outlookMsg = (Outlook.MailItem)outlookApp.CreateItem(Outlook.OlItemType..olMailItem);

     // default parameters
     outlookMsg.Subject = tbsubject.Text; // subject
     outlookMsg.To = tbEmail.Text;// To
     outlookMsg.CC = tbEmailCc.Text; // Cc
     

    // close the loading window
    loadingWindow.Dispose();

    this.Enabled = true;
     outlookMsg.Display(true);
    outlookMsg = null;

    outlookApp=null;

    I am using the code as above. Also i am using Outlook Version 2010.


    Ken Slovak MVP - Outlook
    Wednesday, May 1, 2013 1:51 PM
    Moderator