File Name in Summary Title Box

B

Barry B

Doses Anyone know how I can have the File Name entered in the Project
Properties Summary Title Box automatically? We are try to make the Project
Summary Title to match the file name everytime we update the project with a
new filename.
 
B

Brian K - Project MVP

Barry said:
Doses Anyone know how I can have the File Name entered in the Project
Properties Summary Title Box automatically? We are try to make the
Project Summary Title to match the file name everytime we update the
project with a new filename.

This is an odd one because the BeforeSave event fires just before the
save and if you do a SaveAs the code I can fire there would set the
value of this property BEFORE you give it the new file name. But if you
put this code in your file and then do you file save as and then do
another save right away you are all set.

Private Sub Project_BeforeSave(ByVal pj As Project)
Dim x As DocumentProperties
Set x = ActiveProject.BuiltinDocumentProperties
x.Item("Title") = ActiveProject.Name
End Sub

This code puts the filename.mpp in the Title property. If you want the
full path change Activeproject.name to Activeproject.fullname. This
gets kind of long though. :)
 
B

Barry B

Brian,

Would I make this a new macro? If not, where and how would I add this.

Thanks.
 
B

Brian K - Project MVP

Barry said:
Brian,

Would I make this a new macro? If not, where and how would I add
this.

Thanks.

Just copy it into the "ThisProject" object for the project. and it will
run everytime the project is saved.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top