Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - Generating Outlook Signatures Based on Act...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Generating Outlook Signatures Based on Active Directory Information
By: Luke Niland
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-06-23

    Table of Contents:
  • Generating Outlook Signatures Based on Active Directory Information
  • Checking for Existing Signature File
  • Creating the signature
  • Finishing the Signature File

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Generating Outlook Signatures Based on Active Directory Information - Finishing the Signature File


    (Page 4 of 4 )

    Now that we have the basics down, let's create the rest of the file using the same method:


    If UserObj.telephoneNumber <> "" then CreateSigFile.WriteLine "<DIV align=left><FONT face=Arial color=#808080 size=1>" & "Tel: &nbsp;&nbsp;&nbsp;&nbsp;" & "</font><FONT face=Arial color=#808080 size=2>" & UserObj.telephoneNumber & "</FONT></DIV>"

    If UserObj.mobile <> "" then CreateSigFile.WriteLine "<DIV align=left><FONT face=Arial color=#808080 size=1>" & "Mob: &nbsp;&nbsp;" & "</font><FONT face=Arial color=#808080 size=2>" & UserObj.mobile & "</FONT></DIV>"

    If UserObj.mail <> "" then CreateSigFile.WriteLine "<DIV align=left><FONT face=Arial color=#808080 size=1>Email: <A href=" & strQuteChr & "mailto:" & UserObj.mail & strQuteChr & ">" & UserObj.mail & "</A></FONT></DIV>"

    If UserObj.wWWHomePage <> "" then CreateSigFile.WriteLine "<DIV align=left><FONT face=Arial color=#808080 size=1>" & "Web: &nbsp;&nbsp;" & "</font><FONT face=Arial color=#808080 size=1><A href=" & strQuteChr & UserObj.wWWHomePage & strQuteChr & ">" & UserObj.wWWHomePage & "</A></FONT></DIV>"

    CreateSigFile.WriteLine "<DIV align=left><FONT face=Arial size=2></FONT><br></DIV>"


    'append the image

    strLogoPath = "http://www.myorg.com/logos/email_sig.jpg

    CreateSigFile.WriteLine "<DIV align=left><IMG alt=" & strQuteChr & UserObj.company & strQuteChr & " hspace=0 src=" & strQuteChr & strLogoPath & strQuteChr & " border=0> </DIV>"


    CreateSigFile.WriteLine "</BODY></HTML>"

    CreateSigFile.Close


    In addition to adding the user's contact details to the signature file, we have also added a company logo. Remember, because it is an HTML document, we can do quite a bit with it.

    Now save the script and run it. If all goes according to plan, you should see a new HTML file in your signatures directory that you can use as your signature. If you are a Microsoft Outlook user, go to options and under the mail format tag, you should see your new file in the available signature drop down.

    Improving the Script

    Of course, there are a few things that could help improve the script. You could base the company logo on an active directory group or organizational unit, check for the existence of Outlook before creating the script, and automatically make your signature the default one in Outlook. There's quite a bit of room for improvement, but this script should give you a good base from which to start.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · Thanks for a useful article. I may implement this on a web page so that Users can...
       · The line:-SigFolder = StrAppData & "MicrosoftSignatures"should, of course,...
       · Hi - sorry this may seem obvious but I haven't used VB for years (C# used by last...
       · Hi Lucy,The example her is just a vb script, and as far as i'm aware you wont be...
       · Hi "I would make it automatically set the default Auto signature though."I...
     

    WINDOWS SCRIPTING ARTICLES

    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...
    - Modifying XML Files in WSH
    - Reading XML Files in WSH
    - Visual Basic 2005 XML Programming Using XML ...
    - Creating an XML Document in WSH
    - Introducing Two-Way Data Binding using Silve...
    - Silverlight 2.0 Application Development with...
    - Burning Multisession CDs with IMAPI2 in WSH
    - Creating a Silverlight 2.0 Application that ...
    - Burning CDs with the IMAPI2 Control
    - Burning CDs in Windows XP with WSH

     
    Best Practices for Windows Vista Migration Presentation
    Dell and Microsoft recently held a series of face-to-face seminars entitled, &qu....

     
    Creating a Culture for Code Reuse
    If you oversee development teams you know that like it or not proprietary and ex....

     
    Keys to Web Application Acceleration: Advances in Delivery Systems
    Accelerate Web apps by up to 5x. Ensure significantly faster access to the Web a....

     
    Optimizing Application Monitoring
    Tired of finding out from your customers that you're offline? This white paper e....

     
    Solaris to Solaris Migration -- Migrating applications from Sun SPARC to Dell PowerEdge R900
    This comprehensive Migration Guide reviews the approach that Principled Technolo....

     




    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT