none
Project 2013 Print Header Text Font change RRS feed

  • Question

  • Hello All,

         I am working in MS Project 2013 and am setting up the printing macro's I need for my shutdowns. There are 30 different filters to print so I need to make this as automatic as possible.

    I can setup all the parts I need in vba accept the Header Font.

    I can add the text using vba but for the life of me I can't work out how to change the font.

    I currently have the code so that the Page setup opens after adding the text and I change the font manually.

    Does anyone have the code for me to do this?

    I would also like to be able to set the printer properties to print in colour (Our company has set the printers to default B&W print) and staple the top left corner but these arent an issue as they are only done once.

                                                                                                  

    Sub AHRENS_Print()

    'Add Filter
        FilterApply Name:="AHRENS"




    'Page Setup Header Settings
    FilePrintPreview

    FilePageSetupHeader Alignment:=pjCenter, Text:="AHRENS"
    Font32Ex Name:="Tahoma", Size:=16, Bold:=True, Underline:=True, Color:=pjBlue


       FilePageSetupHeader

    FilePrint (3)


    Saturday, June 23, 2018 7:34 AM

All replies

  • Frustrated,

    Unfortunately the FilePageSetupHeader Method does not provide a direct means for setting font color. In your code snippet, the Font32Ex Method essentially applies to nothing.

    However there supposedly is a way to insert an image in the header via a text format code but so far I've been unable to "decode" the proper code syntax to actually insert an image. Hopefully someone else will step in with the magic syntax.

    John

    Saturday, June 23, 2018 4:34 PM
  • Thanks You for your reply. It is very much appreciated.

    I had a sneaky suspicion this may be the case. 

    Sunday, June 24, 2018 12:08 PM
  • Frustrated,

    You're welcome and thanks for the feedback.

    John

    Sunday, June 24, 2018 1:24 PM