SPath = sPath & Application.PathSeparator MsgBox "Need to save before running this macro.", _ For instance, the following macro will insert, at the insertion point, the desired number of directory levels for the current file: The only solution is to create a macro that determines the path name and inserts the desired levels into the document. Unfortunately, there is no way to do this with the FILENAME field itself it just doesn't include that capability. You might want to limit the directory levels displayed, as shown in these two examples: For instance, the following may be the full path name for the document:Ĭ:\My Documents and Settings\Level1\Level2\Level3\Level4\Doc1.docx For this reason, you may want to selectively choose which levels of the path are included in what FILENAME returns. If you use the /p switch with the field, you get not only the file name, but also the full path for the file:Īs you can imagine, the path name can get rather long, depending on how your hard drive is organized and where you stored the document. The FILENAME field allows you to insert the name of the document file into the document itself.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |