#1
|
|||
|
|||
Relative path to desktop
How can I define the relative path to current user's desktop folder and to the document folder itself?
sorry for asking lots of questions! |
#2
|
||||
|
||||
Hi b0x4it,
Try: Code:
Sub Demo() MsgBox Environ("USERPROFILE") & "\Desktop" End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
thank you, what about the current document folder?
|
#4
|
||||
|
||||
For the 'My Documents' folder, you should be able to replace "\Desktop" with "\My Documents".
For the current document, it's: MsgBox ActiveDocument.Path (for a new unsaved document this will be empty)
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
thank you very much
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Instant Search syntax for relative dates | eagleeye | Outlook | 1 | 05-16-2011 03:58 PM |
Saving to Desktop from MSWord | greeninmexico | Word | 1 | 01-05-2011 08:30 PM |
Cross reference - full vs relative context | macron | Word VBA | 0 | 12-02-2010 08:54 PM |
CHALLENGE! Issue sorting data containing relative references on a separate tab | lax828 | Excel | 3 | 01-07-2010 11:28 AM |
attaching (relative,logical or virtual) path to template word document | wissam | Mail Merge | 0 | 08-04-2009 05:09 AM |