MS Outlook lookups



I have an IIS website where users have authenticated using an ID. I
need to perform a lookup of this ID via Outlook. A coworker suggested
that I download all the user names from Outlook to a flat file and then
do lookups that way. He was also able to produce some TCL code that
accomplishes this for him. Neither he nor I user TCL and I really need
a solution in perl. If someone could look at the following code and
tell me how to write it in perl, I'd be estatic.

#!/usr/local/bin/tclsh_current

set CALLDB2 /home/db2/db2clnt/sqllib/bin/db2 # Log on to Outlook
catch {exec $CALLDB2 -tvf /data/.secure/connect/logon_XCDB.sql} sqlrc

#----------------------------------------------
# Work File definitions
#----------------------------------------------
set sql_out /data/bb/results.txt

set sql1 /data/bb/unload.sql
set outfile1 [open $sql1 w 0644]
puts $outfile1 "SELECT DISTINCT "
puts $outfile1 " RTRIM(UCASE(MAIL_NNME)) AS MS_EMPL_ID "
puts $outfile1 " ,EMPL_ID AS MS_USER_ID "
puts $outfile1 " ,LCASE(substr(SMTP_EMAIL_ID,6,50)) AS MS_EMAIL"
puts $outfile1 " ,RTRIM(EMPL_LNME) || ', ' || "
puts $outfile1 " RTRIM(EMPL_FNME) || ' ' || "
puts $outfile1 " EMPL_MINIT AS MS_EMPL_NAME "
puts $outfile1 " FROM XC.TEXCH_FULL_DCTRY "
puts $outfile1 "where EMPL_LNME > ' ' "
puts $outfile1 " and EMPL_FNME > ' ' "
puts $outfile1 " and EMPL_ID > ' ' "
puts $outfile1 " ;"
close $outfile1

#Execute Statememt
catch {exec $CALLDB2 -tvf $sql1 > $sql_out} emplrc

.



Relevant Pages

  • Re: MS Outlook lookups
    ... > need to perform a lookup of this ID via Outlook. ... Neither he nor I user TCL and I really need ... > tell me how to write it in perl, ...
    (comp.lang.perl.modules)
  • Re: Using an Excel Sheet in a custom outlook form
    ... you can paste a formula into a spreadsheet control cell: ... Sue Mosher, Outlook MVP ... >> I just added a simple Lookup() with source and results ranges to my ... >>> Can you give me a link to the form where you used the lookup function ...
    (microsoft.public.outlook)
  • Re: Automatically extracting MS Outlook 2007 calendar entries with perl (on WIndows)
    ... Have you tried looking at the Export options of Outlook? ... perl if needed. ... I don't even know which file contains the calendar data: ... simple format within these three files. ...
    (comp.lang.perl.misc)
  • Re: Using an Excel Sheet in a custom outlook form
    ... Lookup worked for me in a small test here. ... Sue Mosher, Outlook MVP ... >I designed a form in Outlook 2003 and inserted an excel sheet in it with a ... > The same lookup function works in an excel spreadsheet outside the form, ...
    (microsoft.public.outlook)
  • Perl analysing a Microsoft .msg file
    ... Outlook mailbox and creating a mail message. ... But rather than connect to a mailbox, I just start with a .msg file. ... In ActiveState Perl, I have stumbled on a Win32::OLE - Type Library Browser ...
    (comp.lang.perl.misc)