Outlook signature based on user information from Active Directory

Create Outlook signature based on user information from Active Directory.

Add to favorites
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question

  • Outlook \ Word 2013
    1 Posts | Last post February 19, 2014
    • I have been using this script without any issues with Outlook 2003 and 2007, however now we have some computers using Office 2013 and the script is returning errors. Same error for each HTML, RTF and Text
      Unable to find type [Microsoft.Office.Interop.Word.WdSaveFormat]: make sure that the assembly containing this type is loaded.
      At C:\Users\temp\Desktop\Set-OutlookSignature.ps1:247 char:73
      + $saveFormat = [Enum]::Parse([Microsoft.Office.Interop.Word.WdSaveFormat] <<<< , “wdFormatHTML”);
          + CategoryInfo          : InvalidOperation: (Microsoft.Offic...rd.WdSaveFormat:String) [], RuntimeException
          + FullyQualifiedErrorId : TypeNotFound
      [ref] cannot be applied to a variable that does not exist.
      At C:\Users\temp\Desktop\Set-OutlookSignature.ps1:249 char:59
      + $MSWord.ActiveDocument.saveas([ref]$path, [ref]$saveFormat <<<< )
          + CategoryInfo          : InvalidOperation: (saveFormat:Token) [], RuntimeException
          + FullyQualifiedErrorId : NonExistingVariableReference
      Exception setting "Color": "Exception from HRESULT: 0x800A1018"
      At C:\Users\temp\Desktop\Set-OutlookSignature.ps1:172 char:18
      +  $selection.Font. <<<< color ="wdColorGreen"
          + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
          + FullyQualifiedErrorId : PropertyAssignmentException
  • Different signatures for New mail and replies forwards
    1 Posts | Last post January 31, 2014
    • The code at http://www.edugeek.net/blogs/thescarfedone/1108-remote-desktop-thin-client-part-2-prev.html works. Can anyone suggest how to make two signatures, one for new mail and one ofr replies/forwards.
  • Hi there
    1 Posts | Last post September 17, 2013
    • Im recieving that error can you help me about it? Many Thanks 
      Missing closing ')' after expression in 'if' statement.
      At D:\temp\Set-OutlookSignature.ps1:74 char:1
      +  <<<< {}
          + CategoryInfo          : ParserError: (CloseParenToken:TokenId) [], ParseException
          + FullyQualifiedErrorId : MissingEndParenthesisAfterStatement
  • TXT Signature is not fully working
    1 Posts | Last post February 05, 2013
    • Hi everyone,
      I have a small issue. All signatures are fully working exept the TXT signature because it is saved as Word in the script so when signatures are created we see correctly the DOCX, RTF, HTM signatures but the TXT if it is opened in Notepad it appear unreadable caracters and in Word it is what we want. The problem is in my outlook 2007 it is opening the unreadable caracters.
      Someone can help me?
  • [REF] problem
    3 Posts | Last post January 21, 2013
    • Hello everyone,
      On some PC where I deployed the outlook signature I have this error. All lines calling this part of word (SaveAs) with [ref] I have this error. Could you help me?
      Argument: '1' should not be a System.Management.Automation.PSReference. Do not
      use [ref].
      At \\BLABLABLA\set-OutlookSignature.ps1:459 char:30
      + $MSWord.ActiveDocument.SaveAs <<<< ([ref] $path, [ref]$SaveFormat::wdFormatTe
          + CategoryInfo          : NotSpecified: (:) [], MethodException
          + FullyQualifiedErrorId : RefArgumentToNonRefParameterMsg
    • Hi again,
      Sorry I didn't enough search. just below I found the answer from Scotty_E I tried as he said with Powershell_ISE(x86) and it worked. now I need to find a way to execute this script in 32 Bits mode with GPO...
      Sorry fo disturb,
    • Or if you want to force running in x86 mode you can follow this blog : http://www.ehow.com/how_12171385_run-only-x86-powershell.html
      Hope that helps,
  • Using this script with Outlook 2010 standalone
    1 Posts | Last post October 06, 2012
    • Hi, 
       Is there any way to get this working without Office 2007/2010. I have a set of Client PCs that only have Outlook 2010 installed; therefore, I don't think the powershell script will work for generating the rtf and html bits for the signature.
      I cannot install Office 2010 on these PCs due to the restricted nature of work at the company I work for. 
  • Some improvement here
    1 Posts | Last post September 15, 2012
    • Hi all, 
      There are some improvement here:
      ************* 1.2 **************
      #    - Fix signature txt format
      #    - Add Variables TelePhoneNumber,description, facsimileTelephoneNumber, mobile, department (line 77-81)
      #    - Add support for OWA, the script now generate the html file by username and copy it on Exchange Server shared Directory for succeeding import (line 64)
      #    - Changed "wdFormatHTML" with "wdFormatFilteredHTML" this last command save only HTML whitout Office TAGs. This is important because Exchange Server support only 8k for OWA Signs.
      #     On Exchange Server share a folder with name "Signatures" and set the write permissions to "Authenticated Users"
  • Folder Signatures
    2 Posts | Last post September 01, 2012
    • Hello Jan,
      I have two problems,
      If the Signatures folder does not exist, in %appdata\microsoft, it will create the folder? in my case is not creating.
      tested it on two computers but the script did not add signature in Outlook 2010, and no error has occurred in the script.
      What can I do?
    • Hi,
      No, but this is a great enhancement to add.
      You can use Test-Path in an if statement to check if the $LocalSignaturePath exist, and if it does not, use New-Item to create it.
  • Great Script, worked as promised, except......
    1 Posts | Last post January 23, 2012
    • the script worked great once I did a find and replace of all of the single and double quotes throughout it. there are ' and " quotes paired with the 6 and 9 shaped curly quotes all though the script. 
      Once that was done, I added things like mobile, fax (facsimileTelephoneNumber), street address, etc to the script and my signatures, worked very well except that when the script parses out the docx into an HTML, anything that is a hyperlink is converted to Times New Roman, which is no good for my signatures.
  • Error running powershell command
    1 Posts | Last post December 12, 2011
    • hi, i recieved the following error when i try to run the command on powershell.
      PS C:\Users\Administrator> {Set-ItemProperty $CompanyRegPath'\Outlook Signature Settings' -name ForcedSignatureNew -Value $ForceSignatureNew}
      Set-ItemProperty $CompanyRegPath'\Outlook Signature Settings' -name ForcedSignatureNew -Value $ForceSignatureNew
      PS C:\Users\Administrator>
      PS C:\Users\Administrator> if ($ForcedSignatureReplyForward -eq $ForceSignatureReplyForward){}
      PS C:\Users\Administrator> else
      The term 'else' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char:5
      + else <<<<
          + CategoryInfo          : ObjectNotFound: (else:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
1 - 10 of 12 Items