print network user 
Author Message
 print network user

Hi. Does anybody know how I can print the current user in a report ?
Peter


Fri, 07 May 2004 23:41:15 GMT  
 print network user

Quote:

> Hi. Does anybody know how I can print the current user in a report ?
> Peter

If you are using VB you'll have to use an API function like this:

Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
        (ByVal lpBuffer As String, nSize As Long) As Long

Sub Get_User_Name()

    Dim lpBuff As String * 25
    Dim ret As Long

    ret = GetUserName(lpBuff, 25)
    Username = Trim(UCase(Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)))

End Sub

And then use: report.[you text field].settext username

to print it on the report

I hope it helps

Alex



Mon, 10 May 2004 02:05:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Printer.Print dies when printing to network...

2. getting print file to non-installed network print queue

3. Printing to Network Print Queues

4. Network User Name In Textbox

5. Getting a users network loggin name

6. Check if user is logged in to the network

7. Re-attaching a newly created table to other users across a network

8. Read User Name from Network?

9. Read User information from network (WinNT, etc.)

10. Current network user

11. Every user on the network using the same Normal.dot file

12. Closing network user's Outlook via automation

 

 
Powered by phpBB® Forum Software