View Single Post
 
Old 03-17-2022, 04:55 AM
Itsjustbeej Itsjustbeej is offline Windows 10 Office 2016
Novice
 
Join Date: Apr 2021
Location: NC
Posts: 16
Itsjustbeej is on a distinguished road
Default Using the user profile variable for a document template path

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
Reply With Quote