locked
Change FontSize in Powershell code RRS feed

  • Question

  • I've got the following code that creates an e-mail message in Outlook and opens it:

    $ol = New-Object -comObject Outlook.Application
    
    #Create the new email
    $mail = $ol.CreateItem(0)
    
    #Optional, set the subject
    $mail.Subject = "<subject>"
    
    #Optional, set the body
    $mail.Body = "<body>"
    
    #Get the new email object
    $inspector = $mail.GetInspector
    
    #Bring the message window to the front
    $inspector.Activate()

    Now I want to change the FontSize of the message. Is this possible? And how do I do that?

    Wednesday, April 17, 2019 9:37 AM

All replies

  • The font size of a message is set by the client that reads the message.  It is not set by the sender.

    Send an HTML message and use HTML to set the font.

    Search for articles that explain how to send HTML mail.


    \_(ツ)_/

    • Proposed as answer by Pierre-Luc R Wednesday, April 17, 2019 6:15 PM
    Wednesday, April 17, 2019 6:06 PM