Skip to content

A VBS Script to Generate Signature from a Networked Folder and AD/LDAP

License

Notifications You must be signed in to change notification settings

Brandon-Roff/Staff-Outlook-Signiture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Microsoft


Staff Outlook Signiture



Create 4 new Email Signiture for Outlook with (Visual Basic, HTML).

It creates 4 Email Signitures Using Your logo and your AD Detailes

3 Full Signitures and a reply Signiture.

GitHub GitHub issues GitHub pull requests GitHub last commit

πŸ”” Please note: that you need to have Active Directory or LDAP setup as well as Connected to either.

⚠️ Required

Active Directory 2012 + βœ”οΈ
LDAP Enabled βœ”οΈ
Visual Studio Code or Notepad ++ βœ”οΈ
Basic VBS Knowlege βœ”οΈ
Microsoft Word βœ”οΈ
Knowege of AD/LDAP βœ”οΈ

⚑️ Quick start

First, Step is to download it,

This will only work on windows 7, 8, 10, 11

Open up your download folder and Unzip it

Typcially would be C:\Users\YourUsername\Downlaods

Open it Up in you favouite text editor mine is VS Code

Click to install...

VS Code

Your Code should look something like this...

From line 20

strTelephone = " 012345 678912"
strMobile = objUser.Mobile
'strShowMobile = objUser.showMobile'
strFax = objUser.FacsimileTelephoneNumber
strEmail = objUser.mail
strWebsite = "https://website.com/"
strAcademyName = "School or Buisness name"
strAddress = "Address"
strLogo = "\\path\to\logo"
strLogo1 = "\\path\to\logo"
strLogo2 = "\\path\to\logo"
strDDI = objUser.homePhone
strWH = objUser.workingHours
strFollowUsText = "\\path\to\SocialMedia\FollowUs.png"
strFacebookLogo = "\\path\to\facebook.png"
strTwitterLogo = "\\path\to\SocialMedia\twitter.png"
strInstagramLogo = "\\path\to\SocialMedia\instagram.png"

You will need to change the Following values...

Start at Line 20

πŸ“± Change this to your Personal/Companys Telephone Number

strTelephone = " 012345 678912" 

Change this to your companys Landline

strTelephone = " 0800 456789"



Then go to Line 25

🌐 Change this to your Personal/Companys Website address

strWebsite = "https://website.com/"

Change this to your companys website for example for me it would be...

strWebsite = "https://www.roftwares.com"



Then go to Line 26

🏒 Change this to your Personal/Companys Name

strAcademyName = "School or Buisness name"

Change this to your company name for example for me it would be...

strAcademyName = "Roftwares"



Then go to Line 27

πŸ“¨ Change this to your Personal/Companys Address

strAddress = "Address"

Change this to your company Address for example ...

strAddress = "123 southend road AB12 3CD"



Then go to Line 28, 29, and 30

βž• Change this to your Personal/Companys UNC Path (network location) that stores the Logo

strLogo = "\\path\to\logo"
strLogo1 = "\\path\to\logo"
strLogo2 = "\\path\to\logo"

Change this to your Personal/Companys UNC Path for example

strLogo = "\\Network-Share\Home\Folder\Logos\Logo-Footer-1"
strLogo1 = "\\Network-Share\Home\Folder\Logos\Logo-Footer-2"
strLogo2 = "\\Network-Share\Home\Folder\Logos\Logo-Footer-3"

✨ Custom Font Attributes!!

This Part will be for your Fore and surname that are Extracted from AD/LDAP

The Code Bellow is Replicated 4 times.

Lines 52-56, 155-159, 258-262, 366-370

objSelection.Font.Name = "Calibri"
objSelection.Font.Size = 18
objSelection.Font.Color = RGB(242,125,0)
objSelection.Font.Bold = False
if (strCred) Then objSelection.TypeText strName & ", " & strCred Else objSelection.TypeText strName

The Four Attributes which you can Change here is, Font, Font Size, Font Colour and/or Bold font.

πŸ—› Font Type

objSelection.Font.Name = "Calibri"

To change the font type you need to know the correct font type for Microsoft Word click Here to find the list.

πŸ—š Font Size (Can Vary)

objSelection.Font.Size = 18

The font size is recommended to be between 8px - 72px

πŸ”΄ Font Colour

objSelection.Font.Color = RGB(242,125,0)

The font colour can be change by changing the RGB (Red, Green and Blue).
Use this tool to help get your colour you need.

βž• Bold Font

objSelection.Font.Bold = False

If you would like bold font change

objSelection.Font.Bold = False > objSelection.Font.Bold = True

The Font Attributes are applied for all text thats imported or set by LDAP or AD.

For Example:

Title

Found on Lines 60-63, 163-166, 266-269, 374-377

objSelection.Font.Bold = True
objSelection.Font.Size = 14
objSelection.Font.Color = RGB(102,102,102)
if (strTitle) Then objSelection.TypeText strTitle

Academy or Buisness Name

Found on lines 72-74, 169-173, 272-276 and 380-384

objSelection.Font.Size = 14
objSelection.Font.Bold = False
objSelection.Font.Size = 13
objSelection.TypeText Chr(11) 
objSelection.TypeText strAcademyName

Academy or Buisness Address

Found on lines 66-70, 176-178, 279-281 and 387-389

objSelection.Font.Size = 10
objSelection.TypeText Chr(11)
objSelection.TypeText strAddress

The Following Below are NOT Included in the 'Reply Signiture'

Your Imported Mail Address

Found on lines 98-102, 203-207, 306-310

objSelection.TypeText Chr(11)
objSelection.Font.Bold = True
if (strEmail) Then objSelection.TypeText "Email: "
objSelection.Font.Bold = False
objDoc.Hyperlinks.Add objSelection.Range, "mailto:" & strEmail,,,strEmail & Chr(11)

Academy or Buisness website

Found on lines 105-108, 209-212 and 311-314

objSelection.Font.Bold = True
objSelection.TypeText "Website: "
objSelection.Font.Bold = False
objDoc.Hyperlinks.Add objSelection.Range, strWebsite,,,"www.company.org.uk"

βœ”οΈ Thats All !!

When ran it will create in the path "C:\Users\Username\AppData\Roaming\Microsoft\Signatures" Folders and Files something like this:

d-----       24/06/2022     09:37                Full Signature 1_files
d-----       24/06/2022     09:37                Full Signature 2_files
d-----       24/06/2022     09:37                Full Signature_files
d-----       24/06/2022     09:37                Reply Signature_files
-a----       24/06/2022     09:37          46669 Full Signature 1.htm
-a----       24/06/2022     09:37        1706106 Full Signature 1.rtf
-a----       24/06/2022     09:37            440 Full Signature 1.txt
-a----       24/06/2022     09:37          46669 Full Signature 2.htm
-a----       24/06/2022     09:37        1760766 Full Signature 2.rtf
-a----       24/06/2022     09:37            440 Full Signature 2.txt
-a----       24/06/2022     09:37          46607 Full Signature.htm
-a----       24/06/2022     09:37        1724432 Full Signature.rtf
-a----       24/06/2022     09:37            440 Full Signature.txt
-a----       24/06/2022     09:37          39973 Reply Signature.htm
-a----       24/06/2022     09:37          39336 Reply Signature.rtf
-a----       24/06/2022     09:37            190 Reply Signature.txt

In outlook Click Signitures and they will all be there.

⭐️ Project assistance

If you want to say thank you or/and support active development of Staff Outlook Signiture:

Together, we can make this project better every day!

About

A VBS Script to Generate Signature from a Networked Folder and AD/LDAP

Resources

License

Stars

Watchers

Forks

Packages

No packages published