Incorporating the User Profile location into a document template path

Joined
Jan 2, 2020
Messages
16
Reaction score
0
Hi folks,

My company has a toolbar template used for specific documents we write. IT wants to push it to each user via OneDrive, which means the path to the toolbar will be different for each user. Something like this:

C:\Users\username\Regulatory - Templates\Toolbar.dotm

Where username is the user's login name. I know we should be able to do this using the %USERPROFILE% variable, but when I've tested it on my machine it doesn't work. Thus, currently

C:\Users\myname\Regulatory - Templates\Toolbar.dotm

works (where myname = my actual login name), but if I put in

C:\Users\%USERPROFILE%\Regulatory - Templates\Toolbar.dotm

it doesn't. I get an error that the template can't be found.

What's the correct syntax, or what do I need to change to make this work?

Thanks in advance,

Beej
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top