
However, many situations arise in which this default behavior is not what you want. >Go Further: Creating a Unique First-Page Headerīy default, when you define the content for one header, Word displays the same content in every header in the document. Word inserts the header and displays the Header & Footer tab. You can create a header from scratch by inserting a blank header (with one or three columns) or you can click a predefined header template.Ĭlick the type of header you want to add.
#Insert document info on footer mac update#
You can also configure the date and time to update automatically each time you open the document. The current date and time-You can display the current date, time, or both the date and time using various formats.Page numbers-You can insert just the page number, the phrase Page X (where X is the current page number), or Page X of Y (where X is the current page number and Y is the total number of pages in the document).Text-You can type any text, such as a brief document description, a note to the reader, or your company name.Here are your choices for adding content to a header or footer: Typical footer contents include the page number and document filename. As with a header, anything you insert in any footer appears at the bottom of every page in the document. Typical header contents include the document title and the date the document was created or modified.Ī footer is a section that appears at the bottom of each page between the bottom margin and the last line of text.

Any text, graphics, or properties you insert in any header appear at the top of every page in the document. This could probably be better coded using regex.Learn More Buy Working with Headers and FootersĪ header is a section that appears at the top of each page between the top margin and the first line of text. To use it, change the AltText to "", then the subroutine will replace all in the text box by their value. = before + getProperty(propname, ) + after ' If property doesn't exist or we increment sStart to skip this property on next loop Propname = Mid(, sStart + 1, sEnd - sStart - 1)

SEnd = InStr(sStart,, "]")īefore = Mid(, 1, sStart - 1)Īfter = Mid(, sEnd + 1) ' scan all elements of page for textbox with tagged "altText/title" field with ""
#Insert document info on footer mac code#
Here is my updated code if someone needs it: Sub updateProperties() I updated the subroutine a bit myself so that it handles my use case: I needed to insert several custom properties in the same text box, and 1 text box per property couldn't work for me. ' scan for customised properties of the named valueįor Each p In ' scan for standard MS (file) properties of the named valueįor Each p In ' if generated name created return the value ' insert the slide number into the document If Len(author) > 0 And Len(company) > 0 Then ' add separator for author/company if both exist GetProperty = getProperty + yearFrom + "-" ' get the named document property (with optional default)įunction getProperty(propname, Optional def As String) As String ' set the text box to the requested value Propname = Trim(Mid(obj.Title, sStart, sEnd - 2)) ' extract property from between square brackets ' scan all elements of page for textbox with tagged "altText/title" field with "[" ' parse all slides in the active presentation (document)įor Each processPage In ' Copy document properties into all slides

In the properties/Alt Text put the property name into square brackets. Just wrote a subroutine to put named properties into tagged text objects on all slides.
