AnsweredAssumed Answered

Update Sheet Format and Set Header with a Macro

Question asked by Louis Sherwin on Dec 16, 2015

Hi All,

 

Our company is going through a re-branding at the moment and I have created a macro for updating the sheet format on an active drawing. So far, so good. This is working fine for me. My problem is that I also want to set the header at the same time to show the date and time printed. I have been trying the "setheader" and "RightHeader" methods as described in the API help but they don't appear to be working for me. Just wondering if anyone has had any success with this in the past? The relevant bits of code from my macro are as follows:

 

Dim instance As IPageSetup

Dim header_text As System.String

 

header_text = "Printed: " & Date & " " & " " & Time & "    "

 

instance.RightHeader = header_text

Outcomes