Guild of Project Controls: Compendium | Roles | Assessment | Certifications | Membership

Tips on using this forum..

(1) Explain your problem, don't simply post "This isn't working". What were you doing when you faced the problem? What have you tried to resolve - did you look for a solution using "Search" ? Has it happened just once or several times?

(2) It's also good to get feedback when a solution is found, return to the original post to explain how it was resolved so that more people can also use the results.

Inserting the file name & location in the footer

4 replies [Last post]
Andrew Owenson
User offline. Last seen 1 year 4 days ago. Offline
Joined: 18 Jun 2008
Posts: 68
Groups: None
Ok

Its not a planning question, but our procedures people have decreed that the file name and its location has to be on all our programmes etc. Do I have to do it manually or is there a field I can insert ?

Cheers

Andrew

Replies

Nicolas Igersheim
User offline. Last seen 7 years 16 weeks ago. Offline
Joined: 25 Jun 2007
Posts: 62
I use the small macro that follows:
Of course you need to replace Lundi to Dimanche
by the explicit name designation in your language
ie Monday to Sunday.



8<==============================================
Option Explicit


Private Sub project_BeforePrint(ByVal pj As MSProject.Project)

Dim myDate As Date
Dim myText As String
Dim myDay As Long


’ Name Value Description
’ pjSunday 1 Sunday.
’ pjMonday 2 Monday.
’ pjTuesday 3 Tuesday.
’ pjWednesday 4 Wednesday.
’ pjThursday 5 Thursday.
’ pjFriday 6 Friday.
’ pjSaturday 7 Saturday.





myDay = Weekday(Now)



Select Case myDay

Case 1
myText = "Dimanche"

Case 2
myText = "Lundi"

Case 3
myText = "Mardi"

Case 4
myText = "Mercredi"

Case 5
myText = "Jeudi"

Case 6
myText = "Vendredi"

Case 7
myText = "Samedi"

Case Else

End Select

myText = myText & " " & CStr(DateFormat(Now, pjDate_mmmm_dd_yyyy))
myText = myText & " @ " & CStr(DateFormat(Now, pjDate_hh_mmAM))

FilePageSetupFooter Alignment:=pjLeft, Text:="&[affichage] pour &[filtre] in " & Chr(10) & ActiveProject.FullName
FilePageSetupFooter Alignment:=pjCenter, Text:="Imp. par:" & Application.UserName & "Créé par: " & ActiveProject.Author & Chr(10) & "___"
FilePageSetupFooter Alignment:=pjRight, Text:=myText & Chr(10) & "Page &[Page] / &[pages]"

End Sub
Darren Kosa
User offline. Last seen 7 years 10 weeks ago. Offline
Joined: 8 Feb 2008
Posts: 256
Groups: None
Andrew,

In your defence, it was a Friday afternoon.

Regards,

Darren
Andrew Owenson
User offline. Last seen 1 year 4 days ago. Offline
Joined: 18 Jun 2008
Posts: 68
Groups: None
Darren

Talk about the bleeding obvious, The information was staring me in the face and I still missed it. Thanks for your help

Regards

Andrew
Darren Kosa
User offline. Last seen 7 years 10 weeks ago. Offline
Joined: 8 Feb 2008
Posts: 256
Groups: None
Hi Andrew,

You can show the information as a header or a footer.

View > Header and Footer >

Select the appropriate tab and then choose what you want to show from the General drop-down menu.

Regards,

Darren