Outlook signature

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of Brad Brad 1 week, 1 day ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #54339
    Profile photo of Brad
    Brad
    Participant

    Hi,
    Need help to add signature to email
    my code:
    $Outlook = New-Object -comObject Outlook.Application

    $mail = $Outlook.CreateItem(0)
    $mail.Subject = "TTT"
    #$mailSign = Get-Content ($env:USERPROFILE + "\AppData\Roaming\Microsoft\Signatures\*.html")
    $mail.Body = "Hi, "

    $mail.Save()

    $inspector = $mail.GetInspector
    $inspector.Display()

    #54345
    Profile photo of Chris Bakker
    Chris Bakker
    Participant

    Struggled with that one, this worked for me.
    Although is doesnt look very nice...

    $text="hi guys"
    $temp=$mail.body
    $mail.htmlbody=get-content $env:appdata\Microsoft\Signatures\*.htm
    $mail.body= $text +$mail.body + $temp

    #54346
    Profile photo of Rob Simmers
    Rob Simmers
    Participant
    #54354
    Profile photo of Brad
    Brad
    Participant

    Thank you both,
    and what about outlook template file .oft, how i can open it?
    Thanks.

    #54387
    Profile photo of Brad
    Brad
    Participant

    just one more, how i can show signature image

    Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.