Jump to content



Photo

Globalized Outlook and OWA Signature Project


  • Please log in to reply
18 replies to this topic

#1 joshiieeii

joshiieeii

    Adventurer

  • Active Members
  • PipPip
  • 137 posts

Posted 19 July 2006 - 04:22 PM

Globalized Outlook and OWA Signature Project

1st Real Project Posted BTW :D
*edit: had to reattach attachment. Working on explaining how to edit the setsignature.xml

Purpose: To standardize a signature for all users using data from Active Directory. This script also includes adding signatures to Outlook Web Access (OWA). Settings can also be changed for both Outlook and OWA, this can include default message type (HTML, Rich Text, Text), default signature used, OWA timezone settings, ect... This script is meant to be ran within the login script to setup each user's signature.

Versions:

0.5 Initial Release 7-19-2006: Includes ability to change Outlook and OWA signatures. Ability to change settings in both Outlook and OWA.

Explaination of files included in the zip file:
EmailSig.au3: AutoIT script
ExCmd.exe : is from HERE. I have contacted the author and he has stated it is freeware. Feel free to scan it, prod it, whatever, I trust the source and have not seen any unwanted results from using it. It is simply a WEBDAV command line utility.
getproperty.xml : is from the above site as well, it is used to replace variables before sending the command to the exchange server. Typically used to get the value of a property.
setproperty.xml : is from the above site as well, it is used to replace variables before sending the command to the exchange server. Typically used to set the value of a property.
setsignature.xml : is from the above site as well, it is used to replace variables before sending the command to the exchange server. Typically used to set the value of the signaturehtml field.


Here is the code for anyone interested, I am still refining it, and welcome any suggestions on how to improve any portion of the code.
AutoIt         
#include <GUIConstants.au3> #include <Misc.au3> #include <File.au3> #include <Process.au3> #include <Constants.au3> #include <string.au3> Dim $UserObj DIM $sigpath                = ( @AppDataDir &'\microsoft\signatures' ) Dim $msg Dim $msg1 Dim $domain = @LogonDomain   ;pulls domain that user is logged into Dim $username = @UserName    ;pulls username that is logged in Const $ADS_NAME_INITTYPE_GC = 3 Const $ADS_NAME_TYPE_NT4 = 3 Const $ADS_NAME_TYPE_1779 = 1 $oMyError = ObjEvent("AutoIt.Error", "ComError") $objRootDSE = ObjGet("LDAP://RootDSE") ; DNS domain name.     $objTrans = ObjCreate("NameTranslate")     $objTrans.Init ($ADS_NAME_INITTYPE_GC, "")     $objTrans.Set ($ADS_NAME_TYPE_1779, @LogonDomain)     $objTrans.Set ($ADS_NAME_TYPE_NT4, @LogonDomain & "\" & @UserName)     $strUserDN = $objTrans.Get ($ADS_NAME_TYPE_1779)     $UserObj = ObjGet("LDAP://" & $strUserDN) DIM $fullname               = $UserObj.FullName DIM $department             = $UserObj.Department DIM $streetaddress          = $UserObj.get("streetAddress") DIM $city                   = $UserObj.get("l") DIM $state                  = $UserObj.get("st") DIM $zipcode                = $UserObj.PostalCodes DIM $country                = $UserObj.get("c") DIM $emailaddress           = $UserObj.EmailAddress DIM $officenumber           = $UserObj.TelephoneNumber DIM $mobilenumber           = $UserObj.TelephoneMobile DIM $faxnumber              = $UserObj.FaxNumber DIM $homeMDB                = $UserObj.get("homeMDB") Dim $homeMDBtext            = StringSplit($homeMDB, ",") Dim $mailboxname            = StringTrimLeft($homeMDBtext[4], 3) Dim $salutation             = ("Best Regards,") Dim $Disclaimer             = ("Disclaimer here") Dim $Defaultsigname         = ("test") Dim $sightm                 = ("test.html") Dim $siggif                 = ("testgif.html") Dim $sigtxt                 = ("test.txt") If FileExists ( $sigpath &'\'& $sightm) Then    ;checks to see if the htm version of the signature is there returns '1'=exist '0'=does not exist     Exit EndIf If FileExists ( $sigpath &'\'& $siggif) Then    ;checks to see if the htm version with a gif image embedded in the signature is there returns '1'=exist '0'=does not exist     Exit EndIf If FileExists ( $sigpath &'\'& $sigtxt) Then    ;checks to see if the txt version of the signature is there returns '1'=exist '0'=does not exist     Exit EndIf call ("regsig") call ("gifsig") call ("textsig") call ("SigRegisty") call ("OWAsig") call ("OWATimeZone") Func OWATimeZone (); Sets timezone to equal what is on the users PC Dim $timezone = RegRead ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation", "StandardName") Run(@ComSpec & " /c " & 'ExCmd proppatch http://'& $mailboxname &'.'& $domain &'/exchange/'& $username &' /c:setproperty.xml ns="http://schemas.microsoft.com/exchange/" name="timezone" value="'& $timezone &'"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) EndFunc Func OWAsig () FileInstall (@ScriptDir &"\ExCmd.exe", @ScriptDir &"\ExCmd.exe") FileInstall (@ScriptDir &"\setsignature.xml", @ScriptDir &"\setsignature.xml") FileInstall (@ScriptDir &"\setproperty.xml", @ScriptDir &"\setproperty.xml") FileInstall (@ScriptDir &"\getproperty.xml", @ScriptDir &"\getproperty.xml") $filename = (@ScriptDir &"\setsignature.xml") ;Replaces Salutation     $find = "<salutation>"     $replace = ""& $salutation     $retval = _ReplaceStringInFile($filename,$find,$replace) ;Replaces Fullname     $find = "<fullname>"     $replace = ""& $fullname     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the Department $find = "<department>"     $replace = ""& $department     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the Office Number $find = "<officenumber>"     $replace = ""& $officenumber     $retval = _ReplaceStringInFile($filename,$find,$replace) ;Replaces the Mobile Number $find = "<mobilenumber>"     $replace = ""& $mobilenumber     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the email address $find = "<emailaddress>"     $replace = ""& $emailaddress     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the Street Address     $find = "<streetaddress>"     $replace = ""& $streetaddress     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the City $find = "<city>"     $replace = ""& $city     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the state $find = "<state>"     $replace = ""& $state     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the zipcode $find = "<zipcode>"     $replace = ""& $zipcode     $retval = _ReplaceStringInFile($filename,$find,$replace)     ;Replaces the country $find = "<country>"     $replace = ""& $country     $retval = _ReplaceStringInFile($filename,$find,$replace) ;Replaces Disclaimer     $find = "<disclaimer>"     $replace = ""& $Disclaimer     $retval = _ReplaceStringInFile($filename,$find,$replace)  $foo = Run (@ComSpec & " /c " & 'ExCmd proppatch http://'& $mailboxname &'.'& $domain &'/exchange/'& $username &' /c:setsignature.xml ns="http://schemas.microsoft.com/exchange/" name="signaturehtml"', "", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ;Testing purposes only ;Dim $foo1 = Run(@ComSpec & " /c " & 'exCmd propfind http://'& $mailboxname &'.'& $domain &'/exchange/'& $username &' /c:getproperty.xml ns="http://schemas.microsoft.com/exchange/" name="signaturehtml"', "", @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) ;~ While 1 ;~     $line = StdoutRead($foo) ;~     If @error = -1 Then ExitLoop ;~  FileWrite ("C:\test.txt", $line &"") ;~     MsgBox(64, "STDOUT read:", $line) ;~   ;~ Wend ;~ While 1 ;~     $line = StdoutRead($foo1) ;~     If @error = -1 Then ExitLoop ;~  FileWrite ("C:\test.txt", $line &"") ;~     MsgBox(64, "STDOUT read:", $line) ;~   ;~ Wend EndFunc Func regsig () $filename1 = $sigpath & "\test.htm" $msg1 &= "<HTML><HEAD><TITLE>test Signature</TITLE>"& @CRLF $msg1 &= "<BODY>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2>"& $salutation &"</FONT></DIV>"& @CRLF $msg1 &= "<DIV align=left> </DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2></FONT> </DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT size=2><FONT face=Arial><STRONG><FONT" & @CRLF $msg1 &= "color=#808080>"& $fullname &"</FONT></STRONG>  <STRONG><FONT " & @CRLF $msg1 &= "color=#808080>"& $department &"</FONT></STRONG></FONT></FONT></DIV>" & @CRLF $msg1 &= "<EM>technologies</EM></FONT></FONT></DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2><STRONG>T:</STRONG> "& $officenumber &"  <STRONG>M:</STRONG></FONT> "& $mobilenumber &" </DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2><a href='mailto:"& $emailaddress &"'> "& $emailaddress &"</a>  "& $streetaddress &"  "& $city &", "& @CRLF $msg1 &= ""& $state &"  "& $zipcode &"  "& $country &"</FONT></DIV><FONT face='Arial' size=3></FONT><I><FONT color=#808080 size=1>"& $Disclaimer &"</FONT></DIV></I></BODY></HTML>" FileWrite($filename1, $msg1 );Writes the text to the html file EndFunc Func gifsig () $filename = $sigpath & "\testgif.htm" FileInstall(@ScriptDir &"\smalllogo2.gif", $sigpath & '\smalllogo2.gif') $msg &= "<HTML><HEAD><TITLE>test Signature with GIF</TITLE>"& @CRLF $msg &= "<BODY>"& @CRLF $msg &= "<DIV align=left><FONT face=Arial size=2>"& $salutation &"</FONT></DIV>"& @CRLF $msg &= "<DIV align=left> </DIV>"& @CRLF $msg &= "<DIV align=left><FONT face=Arial size=2></FONT> </DIV>"& @CRLF $msg &= "<DIV align=left><FONT size=2><FONT face=Arial><STRONG><FONT" & @CRLF $msg &= "color=#808080>"& $fullname &"</FONT></STRONG>  <STRONG><FONT " & @CRLF $msg &= "color=#808080>"& $department &"</FONT></STRONG></FONT></FONT></DIV>" & @CRLF $msg &= "<DIV align=left><FONT size=2><FONT face=Arial> <STRONG><FONT color=#808080><IMG alt='' hspace=0 src='"& $sigpath & "\smalllogo2.gif' align=baseline border=0></FONT></STRONG></FONT></FONT> $msg &= "<DIV align=left><FONT face=Arial size=2><STRONG>T:</STRONG> "& $officenumber &" "& @CRLF $msg &= " <a href='mailto:"& $emailaddress &"'> "& $emailaddress &"</a>  "& $streetaddress &"  "& $city &", "& @CRLF $msg &= ""& $state &"  "& $zipcode &"  "& $country &"</FONT></DIV>"& @CRLF $msg &= "<DIV align=left><I><FONT face=Arial color=#808080 size=1>"& $Disclaimer &"</FONT></DIV></I></BODY></HTML>" FileWrite($filename, $msg );Writes the text to the html file EndFunc Func textsig () ;Text file creation $filename = $sigpath & "\test.txt" $msg = ""& $salutation & @CRLF $msg &= @CRLF $msg &= @CRLF $msg &= ""& $fullname &"  "& $department &"" & @CRLF $msg &= "T: "& $officenumber &"  M: "& $mobilenumber &" "& @CRLF $msg &= ""& $emailaddress &"  "& $streetaddress &"  "& $city &", "& $state &"  "& $zipcode &"  "& $country &"" & @CRLF $msg &= ""& $Disclaimer FileWrite($filename, $msg );Writes the text to the file EndFunc     Func SigRegisty ();Changes registry settings for Outlook $var = RegRead ("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail\", "EditorPreference") if $var = 131072 Then Else RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Options\Mail\", "EditorPreference", "REG_DWORD", "131072");Changes the default format for outgoing messages to HTML EndIf ;Working on adding a string to HEX conversion for the name of the default signature, ;Writes NEW Signature as the default signature (Requires Restart of Outlook to take affect). Set your signature and drill down in the resgistry to find the HEX value for the signature name RegWrite ("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\%profilename%\9375CFF0413111d3B88A00104B2A6676\00000001", "New Signature", "REG_BINARY", "%HEX Signature name with 00 between each letter and trailing 0000000%") EndFunc ;COM Error function Func ComError()     If IsObj($oMyError) Then         $HexNumber = Hex($oMyError.number, 8)         SetError($HexNumber)     Else         SetError(1)     EndIf     Return 0 EndFunc ;==>ComError

Attached Files


Edited by joshiieeii, 26 July 2006 - 01:36 AM.








#2 joshiieeii

joshiieeii

    Adventurer

  • Active Members
  • PipPip
  • 137 posts

Posted 19 July 2006 - 06:49 PM

**Updated attached file to include sample setsignature.xml

#3 ptrex

ptrex

    Universalist

  • MVPs
  • 2,399 posts

Posted 25 July 2006 - 12:37 PM

@joshiieeii

Great stuff, something I can use definitely !!

Not tested yet but will soon.

PS:

Do you have a script that globally updates the Outlook Global Contacts settings. I mean setting the parameter to "Show this folder as an E-mail folder as an Email Address Book".

because at the moment I am doing this manually on each PC. Which is stupid of course.

Any help is welcome.

Keep up the good work !!

#4 joshiieeii

joshiieeii

    Adventurer

  • Active Members
  • PipPip
  • 137 posts

Posted 25 July 2006 - 02:23 PM

Thanks, I have not heard about this issue you are having, but I can look into it. Let me know if you have any questions.

*Edit: I am in the process of making an editor to help create and insert the replacement holders for the signatures HERE

Edited by joshiieeii, 25 July 2006 - 02:24 PM.


#5 lod3n

lod3n

    Another day, another mind-boggling adventure!

  • Active Members
  • PipPipPipPipPipPip
  • 874 posts

Posted 18 October 2006 - 03:30 PM

You can use this to create the hex string containing the name:
func unihex($value)     $newvalue = ""     for $i=1 to stringlen($value)         $curchar = stringmid($value,$i,1)         $ascii = asc($curchar)         $z=Hex($ascii,2)         $newvalue=$newvalue & $z & "00"     next     return $newvalue & "0000" endfunc


#6 lod3n

lod3n

    Another day, another mind-boggling adventure!

  • Active Members
  • PipPipPipPipPipPip
  • 874 posts

Posted 18 October 2006 - 03:32 PM

Oh, and you can use this to apply the changes immediately without restarting Outlook:
if processExists("OUTLOOK.EXE") Then     $objWord = ObjCreate("Word.Application") ; this is insane, yes - but it works     $objEmailOptions = $objWord.EmailOptions     $objSignatureObject = $objEmailOptions.EmailSignature     $objSignatureObject.NewMessageSignature = $signame     $objSignatureObject.ReplyMessageSignature = $signame     $objWord.quit() EndIf


#7 Fabiam

Fabiam

    Seeker

  • Active Members
  • 10 posts

Posted 17 September 2007 - 04:48 PM

Hallo,

i can not compile the script with the current Autoit version.

C:\Users\xxx\Desktop\EmailSig\EmailSig\EmailSig.au3(185,125) : ERROR: syntax error (illegal character)
$msg &= "<DIV align=left><FONT size=2><FONT face=Arial> <STRONG><FONT color=#808080><IMG alt='' hspace=0 src='"& $sigpath & "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\xxx\Desktop\EmailSig\EmailSig\EmailSig.au3(185,167) : ERROR: syntax error (illegal character)
$msg &= "<DIV align=left><FONT size=2><FONT face=Arial> <STRONG><FONT color=#808080><IMG alt='' hspace=0 src='"& $sigpath & "\smalllogo2.gif' align=baseline border=0><
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\xxx\Desktop\EmailSig\EmailSig\EmailSig.au3 - 2 error(s), 0 warning(s)

#8 lod3n

lod3n

    Another day, another mind-boggling adventure!

  • Active Members
  • PipPipPipPipPipPip
  • 874 posts

Posted 17 September 2007 - 05:36 PM

Remove the line breaks from each of those two lines.

The forum added them to the original poster's message because they were so long, but you need to manually remove them.

#9 Willian

Willian

    Seeker

  • New Members
  • 1 posts

Posted 09 October 2007 - 09:13 PM

I would like to implement the Standard Signature but I don't know how.
I already read this subject and I didn't understand.
Can you give me a "step-by-step" procedure?
I have Windows 2003 Server, Exchange 2003 Server, Windows XP Pro and Office Outlook 2003/2007.
Thanks.

#10 dmollico

dmollico

    Seeker

  • Active Members
  • 23 posts

Posted 01 November 2007 - 09:56 PM

A few notes for anyone else going to use this only because I spent a bunch of time making it work with my network.
First off - DAMN! What a program and absolutely awesome!
Now - on to the nit picking:

A good portion of this stuff might be mentioned somewhere else - but whatever
1. the downloaded script on line 184 needs an ending quote "

2. You will want to add a bunch of <BR> to different places in the signature so it will properly line feed.

3. I added some brief conditions to check to see if mobile phone and fax existed, then if they did, included them in the making of the signature
AutoIt         
; find out if the cell and fax variables contain anything If $mobilenumber Then $mobiletrue = "<STRONG>Cell:</STRONG> "& $mobilenumber  &"<BR>" If $faxnumber Then $faxtrue = "<STRONG>Fax:</STRONG> "& $faxnumber  &"<BR>" ; setup the signature $msg1 &= "<HTML><HEAD><TITLE>MWBank Signature</TITLE>"& @CRLF $msg1 &= "<BODY>"& @CRLF ; $msg1 &= "<DIV align=left><FONT face=Arial size=2>"& $salutation &"</FONT></DIV>"& @CRLF $msg1 &= "<DIV align=left>&nbsp;</DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2></FONT>&nbsp;</DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT size=2><FONT face=Arial><STRONG><FONT" & @CRLF $msg1 &= "color=#808080>"& $fullname  &"<BR></FONT></STRONG>  <STRONG><FONT " & @CRLF $msg1 &= "color=#808080>"& $title &"</FONT></STRONG></FONT></FONT></DIV>" & @CRLF $msg1 &= "<EM>" & $company & "</EM></FONT></FONT></DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2><STRONG>Office:</STRONG> "& $officenumber  &"<BR>" & @CRLF If $mobilenumber Then $msg1 &= $mobiletrue If $faxnumber Then $msg1 &= $faxtrue $msg1 &= " </DIV>"& @CRLF $msg1 &= "<DIV align=left><FONT face=Arial size=2><a href='mailto:"& $emailaddress &"'> "& $emailaddress &"</a>" & @CRLF $msg1 &= "<BR><a href='http://www.mwankonline.com'>http://www.MWBankonline.com</a>" & @CRLF $msg1 &= "<BR><BR>" & $company & " - " & $office & "<BR>" & $streetaddress &"<BR>"& $city &", "& @CRLF $msg1 &= ""& $state &"&nbsp; "& $zipcode &"&nbsp; "& $country &"</FONT></DIV><FONT face='Arial' size=3></FONT><I><FONT color=#808080 size=1>"& $Disclaimer &"</FONT></DIV></I></BODY></HTML>"ƒo݊÷ ۑbÖ¥–‡í…áb•â'²Ö¥•'+Š›C榦«¨·Ov¦uì^ªê-IÊâ¦Ðâ­©©ªê-Ó݄Ä){ªº‹¢išÛØµ¡ûazö«‰¦åzȧ¶¦Ê‹œj}ýµÊ&¦)^Â+a¶­¶¬±ç¦²Ú0¢¹'‰Ç¥ÈX¥x‰ìµ©eªê-¦uì^ªê-ªê-¦uì^ªê-è‡ò¢ìžÛhºÇ­…ꮢÚ~'ªê-~'¥v‡ß¶†zw«j[Zn)À«{*.‚€È3Mú¡÷âqƒo݊÷ ÛÍg£,j'hž¢žØ^~)ڕÊ&¦)^vŒ¨¹§]¶­rWšžêbú+™«b¢|!Ég¥•·œjë‰ü¨ºëŠØ§Ê‹«µë-²ÛŸ~+pŠY]zW­{*.®wžuç^ÆÚÚ~)^²¸ †Ú.¶‡í…çb­ç-¢¼¦jH§‚Ø^±Êâ¦Û¬zW¬±Ú'ßÛZ²B0jË©±ë}"·š–œj}ý¶Æ²†Œ'‰Ç¥¡ÝçßÛ,r¸©¶Éâ¦+b²Ú&jG¢µú+qëazÈ «n­è§¶Šk¡Ûœ¶*'Šižv&­zˆ*.v‰÷öÜžÛhºÈ­Žë-…«Þ¶¬±Êâ¦Ú®¢Úk¡Ç¬±Éh±ê®¢Ú.¶Z(‘ì^ªê-®(!µúèšØ^²Ö«µ©Ýʋ°¢}ý¶¯y©â²Ëž×KazÇ+Š›ZºÚ…ç$±ú+¶ŸŠW¬Š×+y«^±©Ýv‡¬Ÿm®éâ~+_Šwl¶¦"›­ŠØ§jɚ–+jš^®Êr‹¥uÈZž­…«[z¯Š‹«Â­‰ü¨»§¶+m¢·«ºz'²‰ž¢w·öɚr§zŠÞ½êò¢w·öɚr§y۞¶‹(™éš²È¯yÈZž§{(š–§Êv¦yëjëhŠ×6$sigcheckenabled = 0 ;change to a 1 to enable existing signature check If $sigcheckenabled = 1 Then If FileExists ( $sigpath &'\'& $sightm) Then    ;checks to see if the htm version of the signature is there returns '1'=exist '0'=does not exist     Exit EndIf If FileExists ( $sigpath &'\'& $siggif) Then    ;checks to see if the htm version with a gif image embedded in the signature is there returns '1'=exist '0'=does not exist     Exit EndIf If FileExists ( $sigpath &'\'& $sigtxt) Then    ;checks to see if the txt version of the signature is there returns '1'=exist '0'=does not exist     Exit EndIf Else     FileDelete ( $sigpath &'\'& $sightm)     FileDelete ( $sigpath &'\'& $siggif)     FileDelete ( $sigpath &'\'& $sigtxt)     EndIf

11. once again - I couldn't have come up with this on my own - this is an awesome script and I will definately put it to good use - I just wanted everyone to have the above information!

Edited by dmollico, 01 November 2007 - 10:12 PM.


#11 saturno

saturno

    Seeker

  • New Members
  • 1 posts

Posted 31 October 2008 - 06:55 PM

Hi Everyone,

Sorry for waking up this thread exactly one year later, but if someone could give me any advice, I really apreciate it.

Being in a middle of a Exchange 2003 reimplementation project, I found this thread when looking for a way to standardize owa signatures.
Just tested the availlable script, and my first impression is - Awesome. This is awesome.

I'm a system administrator wich don't have any programing skills. I can read and understand the code, make some little adjustments, nothing more so please don't laugh at my question.
Is it expectable that this script could create and put in place an OWA signature?

I tested this in my work PC with Outlook 2003 and it worked flawlessly! Bu it only created the Outlook signature. Is there any way to make it work for OWA signatures?
I have many user wich only access their e-mail's through OWA, many of them via Terminal Services.
Is this possible?


Thanks for any help.

#12 Kage

Kage

    Seeker

  • Active Members
  • 18 posts

Posted 09 June 2011 - 12:28 PM

Big bad necro post im doing here.
but i'd really like to get this working.

when trying to compile this script (after fixing the missing quote) i keep getting "Invalid Fileinstall() Function:"
anyone that cares/can help me ?

#13 water

water

    ?

  • MVPs
  • 10,695 posts

Posted 09 June 2011 - 12:51 PM

The FileInstall stuff is only necessary if you want to create a signature for OWA (Outlook Web Access). If you just want a signature for Outlook you can comment it out.

BTW: I just found this thread and I think it would be a good idea to include the Outlook signature stuff into my OutlooKEX UDF. What do you think?

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#14 Kage

Kage

    Seeker

  • Active Members
  • 18 posts

Posted 09 June 2011 - 01:05 PM

The FileInstall stuff is only necessary if you want to create a signature for OWA (Outlook Web Access). If you just want a signature for Outlook you can comment it out.

BTW: I just found this thread and I think it would be a good idea to include the Outlook signature stuff into my OutlooKEX UDF. What do you think?

i think its a good idea, this signature idea for outlook is really awesome.
great to use in GPO's for big company's

ill try commenting out the fileinstall stuff

#15 supersonic

supersonic

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 448 posts

Posted 10 June 2011 - 05:11 AM

Hi water,

as I started with AutoIt some years ago one of my scripting projects was - and still is - an Outlook Signature Generator.
So, I re-invented the wheel once more... :huh2: This script is based on your AD.au3 UDF and the _XMLDomWrapper.au3 UDF from eltorro.

In the meantime I found [ http://www.zerbit.de/projekte/outlooksignature.aspx ], but this does not fit my needs.

Here are my thoughts on that:

- This is rather another UDF project than just a new function to your OutlookEX.au3 UDF.
There are so many things to pay attention to. Maybe this would exceed the focus of your UDF.
Maybe it should become a "cross-UDF-project" (because of the need of AD and XML functions)?

- As many forum users stated before the currenty version of _XMLDomWrapper.au3 is not in a really good state;
it is not well maintained at the moment... So, do we have to write our own?

- The signature file should be created line by line. Template files are - I know - handy,
but you have too many limitations with them. Here are two simplified examples:

1. If you have the following line "@JOB_GERMAN@ / @JOB_ENGLISH@" and the placeholder "@JOB_ENGLISH@" is an empty string
you would like to remove the "/" after "@JOB_GERMAN@".

2. If a placeholder is or more placeholders are empty then you would like to skip this line.

There could be many more examples... Template files are too solid/static to fit everyone needs.
This is the reason why I store my "templates" in a XML file so I can process line by line and can handle issues like above.

- Currently I have to modify this "templates" with an XML editor, like [ http://www.altova.com/ ].
Doing this manually is no real problem with a good XML editor, but to be handy to others too,
you need a GUI to edit your templates more easily...

- In our company the signature files are generated within the NETLOGON process (or GPO based if you like).
So, there will be a need of linking them into Outook while OUTLOOK.EXE is not running...
(No real big deal, but you have to keep that in mind...)

- Furthermore it would be nice if you could store GIF or JPG files in the XML template file.
Currently there is no need for this in our company; it would be easy to embed them as "CDATA" type.

- At last you should keep in mind that there are three (3) files (= types) for each signature;
there is a HTML, a RTF and a TXT file. During signature generation process, all of them should be
created...

I would really look forward if this becomes a new project. Maybe I could help a bit...

Greets,
-supersonic.

Edited by supersonic, 10 June 2011 - 06:40 AM.


#16 water

water

    ?

  • MVPs
  • 10,695 posts

Posted 10 June 2011 - 06:58 AM

Hi supersonic,

... and I think it would be a good idea to include the Outlook signature stuff into my OutlooKEX UDF ...

I didn't mean to put all this signature creation stuff into the UDF. I thought about letting the user create a signature and then tell Outlook that there is a new signature and when to use it.
What I have so far is a function to list all available signatures and tell you if they are used as default signature for new or reply messages:
Spoiler

and another one to create a simple signature:
Spoiler

Functions to delete / rename / (maybe edit) signatures will follow.

How does this sound?

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#17 supersonic

supersonic

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 448 posts

Posted 10 June 2011 - 08:26 AM

Hi water,

ohhh, I understand your point of view. :huh2:

But I still think, if it comes to editing, it should be a new UDF project...

What about setting signatures for OWA?

Greets,
-supersonic.

#18 water

water

    ?

  • MVPs
  • 10,695 posts

Posted 10 June 2011 - 08:35 AM

But I still think, if it comes to editing, it should be a new UDF project...
What about setting signatures for OWA?

D'accord - signature editing should be in a new UDF.
There seem to be multiple ways to create signatures:

  • Manually create the signature files (.txt, .rtf and .htm) plus create the necessary registry keys so Outlook knows about them. That's something that can be done without starting Outlook. But you can't add a new signature while Outlook is running, it has to be restarted
  • Use Word to create a signature and add it via COM to Outlook. Outlook has to be running and new signatures can be used immediately. That's what I'm gonna do with the _OL_MailSignatureCreate function
How to set signatures for OWA is completely out of my scope because OWA is so different compared to Outlook.

Edited by water, 10 June 2011 - 09:02 AM.

UDFs:

Active Directory (2012-10-12 - Version 1.3.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

OutlookEX (2012-10-07 - Version 0.9.0.0 released) - Download - General Help & Support - Example Scripts - Wiki

ExcelChart (2013-01-21 - Version 0.3.1.1 released) - Download - General Help & Support - Example Scripts

WordEX (2012-12-29 - Version 1.3 released) - Download

ExcelEX (2013-05-11 - Alpha 4 released) - Download


#19 JonF

JonF

    Seeker

  • Active Members
  • 19 posts

Posted 18 May 2012 - 03:40 PM

when trying to compile this script (after fixing the missing quote) i keep getting "Invalid Fileinstall() Function:"
anyone that cares/can help me ?

Taking a look at this project... sure looks interesting. I have a signature generator based on GenerateSignatureFromLDAP but it doesn't do the XML version.

The "Invalid FileInstall" is caused by the "@ScriptDir &" in all the first arguments in the FIleInstall calls. Remove "@ScriptDir & " from all of the first arguments and put a dot in front of the first backslash:

FileInstall (".\ExCmd.exe", @ScriptDir &"\ExCmd.exe") FileInstall (".\setsignature.xml", @ScriptDir &"\setsignature.xml") FileInstall (".\setproperty.xml", @ScriptDir &"\setproperty.xml") FileInstall (".\getproperty.xml", @ScriptDir &"\getproperty.xml")     .     .     . FileInstall(".\smalllogo2.gif", $sigpath & '\smalllogo2.gif')

Edited by JonF, 18 May 2012 - 03:44 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users