A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"Printed by:" in Footer



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 09:43 PM
Ruan
external usenet poster
 
Posts: n/a
Default "Printed by:" in Footer

Hello,

Is there a way to display the User who printed the document in the Footer?

Thanks
Ruan


  #2  
Old May 26th, 2004, 09:49 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default "Printed by:" in Footer

Hi
Put the following code in your workbook module (not in a standard
module):
Private Sub Workbook BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In me.Worksheets
With wkSht.PageSetup
.CenterFooter = "Printed by: " & application.username
End With
Next wkSht
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Ruan" schrieb im Newsbeitrag
...
Hello,

Is there a way to display the User who printed the document in the

Footer?

Thanks
Ruan



  #3  
Old May 27th, 2004, 03:28 AM
Ruan
external usenet poster
 
Posts: n/a
Default "Printed by:" in Footer

Thanks Frank,

That worked really great.

Ruan


"Frank Kabel" wrote in message
...
Hi
Put the following code in your workbook module (not in a standard
module):
Private Sub Workbook BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In me.Worksheets
With wkSht.PageSetup
.CenterFooter = "Printed by: " & application.username
End With
Next wkSht
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Ruan" schrieb im Newsbeitrag
...
Hello,

Is there a way to display the User who printed the document in the

Footer?

Thanks
Ruan





  #4  
Old June 1st, 2004, 04:48 AM
CLR
external usenet poster
 
Posts: n/a
Default "Printed by:" in Footer

Frank.........
Is this code intended to return the User that the Excel is installed to, or
the User who signed on the computer?

Vaya con Dios,
Chuck, CABGx3



"Frank Kabel" wrote in message
...
Hi
Put the following code in your workbook module (not in a standard
module):
Private Sub Workbook BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In me.Worksheets
With wkSht.PageSetup
.CenterFooter = "Printed by: " & application.username
End With
Next wkSht
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Ruan" schrieb im Newsbeitrag
...
Hello,

Is there a way to display the User who printed the document in the

Footer?

Thanks
Ruan





  #5  
Old June 1st, 2004, 06:38 AM
Frank Kabel
external usenet poster
 
Posts: n/a
Default "Printed by:" in Footer

Hi
the first one :-)
For the latter one you'll need a different approach. e.g.

Public Function WinUserName() As String
WinUserName = Environ("UserName")
End Function




--
Regards
Frank Kabel
Frankfurt, Germany


CLR wrote:
Frank.........
Is this code intended to return the User that the Excel is installed
to, or the User who signed on the computer?

Vaya con Dios,
Chuck, CABGx3



"Frank Kabel" wrote in message
...
Hi
Put the following code in your workbook module (not in a standard
module):
Private Sub Workbook BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In me.Worksheets
With wkSht.PageSetup
.CenterFooter = "Printed by: " & application.username
End With
Next wkSht
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Ruan" schrieb im Newsbeitrag
...
Hello,

Is there a way to display the User who printed the document in the
Footer?

Thanks
Ruan


  #6  
Old June 1st, 2004, 11:25 PM
CLR
external usenet poster
 
Posts: n/a
Default "Printed by:" in Footer

Thank you Sir.........another one for my goodie-stash

Vaya con Dios,
Chuck, CABGx3



"Frank Kabel" wrote in message
...
Hi
the first one :-)
For the latter one you'll need a different approach. e.g.

Public Function WinUserName() As String
WinUserName = Environ("UserName")
End Function




--
Regards
Frank Kabel
Frankfurt, Germany


CLR wrote:
Frank.........
Is this code intended to return the User that the Excel is installed
to, or the User who signed on the computer?

Vaya con Dios,
Chuck, CABGx3



"Frank Kabel" wrote in message
...
Hi
Put the following code in your workbook module (not in a standard
module):
Private Sub Workbook BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In me.Worksheets
With wkSht.PageSetup
.CenterFooter = "Printed by: " & application.username
End With
Next wkSht
End Sub

--
Regards
Frank Kabel
Frankfurt, Germany

"Ruan" schrieb im Newsbeitrag
...
Hello,

Is there a way to display the User who printed the document in the
Footer?

Thanks
Ruan




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:13 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.