The trouble is this needs to be done for MANY files so it will take ages to do it by this method manually. If I edit, copy and paste the filename from explorer into the footer and then break the line where I want it broken it prints on three lines (two for the filename and one for the of x). In your case TargetRange could be something like: ActiveDocument.Sections (1).Headers (wdHeaderFooterPrimary).Range.Paragraphs (1).Range. The problem is I think, is that the filename is pulled into the footer, and although I press enter and make the filename appear on two lines, when I print it, it still prints as one line. To get the filename with path try something like this: Range:TargetRange, Type:wdFieldEmpty, Text:'FILENAME \p ', PreserveFormatting:True. this is the section title and will change ![]() This is at the beginning of all filenames This is at the beginning of all filenames - this is the section title and will change ![]() This also shows as two lines within the document itself, even after it is saved and reloaded. ![]() When I edit the footer and press enter it splits the filename into two lines which is what I want. Open the Word document you want to insert file name or path into its header or footer, then click Kutools > Insert File Information. I currently have the footer setup in Insert > Footer > General so that the filename (and of x) automatically gets pulled into the footer.
0 Comments
Leave a Reply. |