Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-01-2022, 07:03 PM
grNadpa grNadpa is offline Stop file from going to OneDrive path and using different Environ("username") Windows 10 Stop file from going to OneDrive path and using different Environ("username") Office 2016
Advanced Beginner
Stop file from going to OneDrive path and using different Environ("username")
 
Join Date: Mar 2022
Posts: 46
grNadpa is on a distinguished road
Default Stop file from going to OneDrive path and using different Environ("username")

I am trying to install a Word 2016 template I developed onto my wife's PC. I copy a file that the template references to her local "C:\Users\(username)\Documents" folder. But when I try to reference that file using that path
Code:
 strRosterPath = "C:\Users\" & Environ("username") & "\Documents\Roster.csv"
, it fails. Further investigation finds that the file is not on her local drive at all but on a OneDrive path and with a different Environ("username").

An internet search confirms that: "In Windows 10, OneDrive is the default save location for your files and documents." (Turn off, disable, or uninstall OneDrive - Knowledgebase - Pen Publishing Interactive, Inc.).

Yet on my PC running windows 10, my files stay where I put them (which is not on OneDrive).



Reconfiguring her machine is not an option. So I'm left with the smelly option of hard-coding that OneDrive path into my template after installing the word .dotm on her machine.

I've confirmed that option works. But isn't there an option that doesn't require hard-coding?

Wife is running Office 365, I'm running Office 2016.
Specifically, I'm running Microsoft Windows 10 Home Build 19044 on a Dell Inspiron 15-3567 using Microsoft Word 2016 MSO (Version 2209 Build 16.0.15629.20196) 32-bit.
Wife's machine running Microsoft Windows 10 Home Build 19043 on an Acer Aspire TC-885 using Microsoft Word 365 MSO (Version 2209 Build 16.0.15629.20200) 64-bit.
Reply With Quote
 

Tags
onedrive, path, windows 10



Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003: VBA "Function" causes "#VALUE!" errors after running "insert/delete row" custom macro Matt C Excel Programming 2 01-08-2022 06:03 AM
Lost folders due to using "Root Folder Path" Selien Outlook 0 09-13-2018 03:30 PM
Stop file from going to OneDrive path and using different Environ("username") Error window: "Document name or path is not valid" SKE Word 1 01-28-2016 10:41 PM
Change "File As" and "Display As" format davesp Outlook 0 10-14-2014 12:10 PM
Stop file from going to OneDrive path and using different Environ("username") Adding additional "\" to directory path name jmaxcy Excel 1 10-15-2013 01:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:19 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft