Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pulling a Outlook profile from a user using ASP

Status
Not open for further replies.

williamsba

Programmer
Aug 3, 2000
57
US
I dont know if this is possible using Active Server Pages or not but Ill give it a try.

Here is what I am trying to do. I have a powerpoint slideshow that everyone in our company needs to view. I will send out the link through Outlook to this slideshow to all of the employees. After they scroll through all of the slides I would like a page to pull their outlook profile and shoot it off in a form to a certain email address. The info we want to get is in their properties, general tab. That way we know exactly who has and who hasnt viewed the slide show. We want it to pull the information so that employees cant enter someone elses info in there without them reading the slide show.

Does anyone out there know of a way to do this? If I can figure out how to pull out one of the fields from the properties I will be able to figure out how to pull the rest of them out as well.

Also if you have any other ideas of how to guarantee that a certain person has viewed the slide show without just entering in false information.

Any input will be greatly appreciated, thank you... Brad Williams
Webmaster
2d Force Service Support Group
United States Marine Corps
 
Brad,

Why don't you instead set up a PPT web slide show (I couldn't tell from your question whether you were pointing the user to a .ppt file or to a web slide show). When they arrive at the site log their username and IP address (use the Request.ServerVariables method) and when they view the last slide log it again as completed. Using the FileSystemObject you could create a log file such as...

Code:
November 3, 2000 08:01:00 - joeuser - 192.168.1.1 - Viewed first slide
November 3, 2000 08:14:00 - joeuser - 192.168.1.1 - Viewed last slide

What I usually do for logging users is create the file as something like joeuser.bgn and when the user finished rename it to joeuser.fin. That way I can easily sort who never finished the install/procedure/event. There are logging measures you can implement with IIS but this method is more granular and easier to read.

As for viewing the Outlook properties, couldn't you simply set up read-receipts instead? Not knowing what info you are gleaning from the properties page I am assuming you are looking at the received date/time.

Hope it helps, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Thank you for the info.

Im really not that good with Active Server Pages yet. I understand what your saying, and it sounds like a great idea. I dont understand exactly how to write out those functions to log the IP and time. Could you point me to an example page? Thank you Brad Williams
Webmaster
2d Force Service Support Group
United States Marine Corps
 
Brad, try this...
Code:
<%@Language = VBScript %>
<%Option Explicit%>
<%
 Dim objFSO
 Dim openFile
 Dim strUserName
 Dim strIPAddress
 Dim strLogPath
 Dim strLogLine
 Dim strExt, strExtFinish
 Dim message
 
 Const ForAppending = 8 
  
 Const cSeparator = &quot; - &quot;
 
 strLogPath = &quot;c:\&quot;
 strExt = &quot;.bgn&quot;
 strExtFinish = &quot;.fin&quot;
 
 strUserName = Request.ServerVariables(&quot;LOGON_USER&quot;)
 If strUserName = &quot;&quot; then strUserName = &quot;unknown&quot;
 
 Dim arrUserName
 arrUserName = Split(strUserName,&quot;\&quot;)
 
 strUserName = arrUserName(UBound(arrUserName))
 
 strIPAddress = Request.ServerVariables(&quot;REMOTE_ADDR&quot;)
  
 Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
 Set openFile = objFSO.OpenTextFile(strLogPath & strUserName & strExt, ForAppending, 1)

' use this code for first page 
 message = &quot;Viewed first slide&quot;
 strLogLine = Now() & cSeparator & strUserName & cSeparator & strIPAddress & cSeparator & message

' use this code instead for last page
' message = &quot;Viewed last slide&quot;
' strLogLine = Now() & cSeparator & strUserName & cSeparator & strIPAddress & cSeparator & message 

 openFile.WriteLine(strLogLine)

 openFile.Close
 Set openFile = Nothing

'if this code is on last page uncomment the line below (renames the file)
'objFSO.MoveFile strLogPath & strUserName & strExt, strLogPath & strUserName & strExtFinish

 Set objFSO = Nothing
%>

Hope it helps, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top