Hi Bryan,
Quote:
Originally Posted by judicial85
Thank you Paul! But like I said, I'm fairly weak in VBA and coding... what is the "english translation" of ActiveDocument.Path?
|
ActiveDocument.Path is a vba expression that returns the path to the active document. It is especially useful where you want to work on a file that's kept in the same folder as the document you're working on. Where the file you're working on is in a different, though related, folder, you can add code to strip off the unwanted parts and add on such additional (known) portions that you might need.
ActiveDocument.Path will typically return a string like:
C:/Users/Bryan/My Documents
so, if you wanted:
C:/Users/Bryan/Desktop
you could use the vba Replace command to change 'My Documents' to 'Desktop', and the ActiveDocument.Path expression combined with the Replace command would then work equally well for: C:/Users/Danny/Desktop;
C:/Users/Tina/Desktop; and
C:/Users/Becky/Desktop,
etc.