Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

New MS Announcements web part -- full name instead of username

  Asked By: Teddy    Date: Oct 29    Category: Sharepoint    Views: 13769

I downloaded the enhanced Microsoft Announcements web part that lets you add
content right from the browser instead of editing in Word or FrontPage.
Very nice indeed. I'm probably going to use it or a variant for Events,
News, etc.

Anyway, it displays the Title, time and "published by", which turns out to
be DOMAIN\username. I'd like to instead display the users' full name. So
instead of "DOMAIN\whall" it displays "Wayne Hall"

I looked at the web part for Announcements and found this in the xsl code:
<td colspan="3">by: <xsl:value-of

...which I gather to be the value that displays the DOMAIN\username piece.

I checked out the web part on sharepointcode's link of
http://www.greenfel.demon.co.uk/scode/UserName.dwp that displays the users'
name and ip address. Very cool. The code that seems interesting is:

UsernameRep=Replace(ucase(UserName) , "\", "/")
set adsUser = getObject("WinNT://" & UserNameRep)
FullName = adsUser.FullName

So I'm thinking this getObject piece could possibly be inserted in the VBS
on the Announcements page in order to get that name. My problem is I'm not
a VBS programmer -- I know just enough to be dangerous. I don't fully
understand XSL either.

Anyone done this? Or is there a different f:publishedby piece to enter in
the xsl code -- maybe this property value is already available in the



No Answers Found. Be the First, To Post Answer.