![]() |
|
#2
|
||||
|
||||
|
ActiveDocument.Path will return the current document's folder name. To go up one level, simply strip off the last folder name from that. For example:
Code:
Sub Demo() Dim StrOldPath As String, StrNewPath As String StrOldPath = ActiveDocument.Path StrNewPath = Left(StrOldPath, InStrRev(StrOldPath, "\")) StrOldPath = StrOldPath & "\" MsgBox StrOldPath & vbCr & StrNewPath End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
| Tags |
| copy files, move files, pdf |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| copy, sync files across 2 folders 1 pc | spgprivate | Office | 0 | 06-20-2013 08:41 AM |
| How to copy linked Excel and Word files and retain links | ashleynpeters1 | Word | 1 | 05-30-2013 02:25 PM |
| Alphabetize Directory | Moira | Windows | 1 | 05-16-2013 03:20 PM |
| Active Directory | ababc | Misc | 0 | 09-19-2006 06:18 AM |
| Active Directory | nukkumatti | Misc | 0 | 11-16-2005 08:42 AM |