How do I use VBA to obtain the file path to a shortcut from which the ActiveDocument was launched? -


i building document management system. in each subdirectory within main document repository, there shortcut document template. when user wants create new document, he/she navigates appropriate subdirectory document , clicks shortcut.

when user clicks shortcut, ms word launched, showing new document based on template. when user clicks save, document saved current directory default location new documents specified in word options.

i want current directory of new document same directory of shortcut created. user has decided document located navigating appropriate subdirectory , clicking shortcut. should not necessary user navigate same location again within save as... dialog.

if can obtain path shortcut, can programmatically save document same directory or new subdirectory.

also asked on msdn vba forum , on vba express.

i don't think you're going able without doing awful hacking around trawling file system (i had brainwave "start in" property of shortcut, sadly didn't work).

unfortunately think best solution may rid of shortcuts , have lots of copies of document template lying around.

chris


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -