How do I get a very long file path to wrap in a footer (MS Word 20
So I stumbled upon the answer though I have no idea what it does or where it
came from. The line of code that made it al work was:
WordBasic.ViewFooterOnly. The code that inserts the text in the footer is as
follows:
'WordBasic.ViewFooterOnly causes the string to be
'inserted properly with automatic line wrapping.
WordBasic.ViewFooterOnly
'Insert actual file path string.
Selection.TypeText Text:=sFileText
'Add filename field
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME ", PreserveFormatting:=True
It does use a selection created in earlier code and inserts a file path
string "sFileText" that is defined in another sub.
--
Sierk
"Sierk" wrote:
I have some customization that inserts a file path into the footer of a
document. The text however runs off the page when the string (file path) is
too long. Is there a way to automatically force the footer to wrap the text?
Thanks
--
Sierk
|