#204033 - 2012-01-09 06:20 PM
Outlook signature options per group
|
sparkie
Getting the hang of it
Registered: 2010-09-14
Posts: 92
Loc: UK
|
I've been doing some vbscript to add an Outlook signature which I intend to amend for Kix but I'd like to try and perform the following.
Is there a way to plant either one number or another depending upon group membership,
E.g.
If in group 1 $ObjSelection......mobile If in group 2 $ObjSelection......telephone
Thanks
|
Top
|
|
|
|
#204034 - 2012-01-09 06:29 PM
Re: Outlook signature options per group
[Re: sparkie]
|
Glenn Barnas
KiX Supporter
Registered: 2003-01-28
Posts: 4396
Loc: New Jersey
|
Have you looked at the ready-made script in the vault for creating Outlook signatures?
The lines$sPhoneNumber = ADSIUserInfo($UserDN, 'telephoneNumber')
$sFaxNumber = ADSIUserInfo($UserDN, 'FacsimileTelephoneNumber')
$sCellNumber = ADSIUserInfo($UserDN, 'Mobile') could be replaced withIf InGroup('groupname')
$sPhoneNumber = ADSIUserInfo($UserDN, 'telephoneNumber')
Else
$sPhoneNumber = ADSIUserInfo($UserDN, 'Mobile')
EndIf
$sFaxNumber = ADSIUserInfo($UserDN, 'FacsimileTelephoneNumber') which would display one or the other. Similarly, you could blank the $sPhoneNumber or $sCellNumber depending on which one you did not want to display. The default (as written) logic displays only the numbers that are defined in AD. A line in the template "Cell: &CellPhone&" would display the word "Cell:" only if the variable contained data. No cell number in AD, no Cell: line in the sig. Note that this example changes the variable definition sequence so the main and cell numbers are in the If logic, moving the fax number to after the If logic.
Also, the script in the vault has no dependency on MS-Office/MS-Word. It will work with any Outlook version and any mail server.
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#204041 - 2012-01-10 10:12 AM
Re: Outlook signature options per group
[Re: Glenn Barnas]
|
sparkie
Getting the hang of it
Registered: 2010-09-14
Posts: 92
Loc: UK
|
I haven't but thanks for that. At the moment we use Kix with a mixture of commands in our script, but also have calls to VBscripts/Reg files.
Whereas that was fine when it was relatively small, I'm thinking it's starting to make sense to call directly using Kix commands which I hope will speed up the script process.
The Sig adding is really an interim measure while we evaluate our Exchange/Signature system so might be a shorterm fix.
Thanks,
Mark
|
Top
|
|
|
|
#204045 - 2012-01-10 03:21 PM
Re: Outlook signature options per group
[Re: Glenn Barnas]
|
sparkie
Getting the hang of it
Registered: 2010-09-14
Posts: 92
Loc: UK
|
I've had a look at the Vault and reading the installation notes couldn't really find any immedite benefit in the short term over what we've done already, although I'm sure yours is of use
I've ended up adding some more code to the VB Script because it seemed less work that getting the current code to work with Kix, and with time being an essence.
Thanks again.
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 248 anonymous users online.
|
|
|