I'm trying to sync the QAT settings across multiple computers by putting Word.officeUI in a Dropbox folder and creating a hardlink to it in C:\Users\<User Name>\AppData\Local\Microsoft\OFFICE of each computer.
Unfortunately, this doesn't seem to work. When I modify the QAT, the Word.officeUI in the C:\Users\<User Name>\AppData\Local\Microsoft\OFFICE is modified accordingly. But it doesn't sync back to original file in the Dropbox folder. I've done similar "cloudifying" using Dropbox with other applications, and they all work.
Is there anything that prevents my scheme of using Hard Link and Dropbox to sync Word.officeUI?
Is Word.officeUI unamenable to Window's hard link?
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Is Word.officeUI unamenable to Window's hard link?
I think Word deletes Word.officeUI then creates a new one. The new one isn't a hard link, of course.
In other words, you cannot use a hard link for this purpose.
In other words, you cannot use a hard link for this purpose.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
Re: Is Word.officeUI unamenable to Window's hard link?
I'm getting really frustrated with the inability to sync my user settings across multiple computers. It was seamlessly done with Word 2007.
As an alternative, I'm thinking of writing a VBA macro that compares Word.officeUI in the C:\Users\<User Name>\AppData\Local\Microsoft\OFFICE with the one in the Dropbox folder and let the newer one replace the older one.
Is VBA sophisticated enough to handle this? Can someone tell me which VBA command should be used?
As an alternative, I'm thinking of writing a VBA macro that compares Word.officeUI in the C:\Users\<User Name>\AppData\Local\Microsoft\OFFICE with the one in the Dropbox folder and let the newer one replace the older one.
Is VBA sophisticated enough to handle this? Can someone tell me which VBA command should be used?
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Is Word.officeUI unamenable to Window's hard link?
The following is untested, test carefully and make a backup copy of Word.officeUI first. I don't think you'll be able to run the code from Word or when Word is active, for I suspect that Word.officeUI will be locked. So you could try running it from Excel, for example, after closing Word.
Code: Select all
Sub Test()
Dim fso As Object
Dim strProfile As String
Dim strPath1 As String
Dim strPath2 As String
Dim fil1 As Object
Dim fil2 As Object
Set fso = CreateObject("Scripting.FileSystemObject")
strProfile = Environ("UserProfile")
strPath1 = strProfile & "\DropBox\Word.officeUI"
Set fil1 = fso.GetFile(strPath1)
strPath2 = strProfile & "\AppData\Local\Microsoft\Office\Word.officeUI"
Set fil2 = fso.GetFile(strPath2)
If fil1.DateLastModified < fil2.DateLastModified Then
fso.CopyFile strPath2, strPath1, True
ElseIf fil1.DateLastModified > fil2.DateLastModified Then
fso.CopyFile strPath1, strPath2, True
End If
End Sub
Last edited by HansV on 24 Feb 2015, 07:45, edited 2 times in total.
Reason: to correct typos
Reason: to correct typos
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
Re: Is Word.officeUI unamenable to Window's hard link?
It doesn't seem to work (even after correcting the first instance of Word.officUI to Word.officeUI).
It doesn't bring up any error but fails to sync the two files.
It doesn't bring up any error but fails to sync the two files.
HansV wrote:The following is untested, test carefully and make a backup copy of Word.officeUI first. I don't think you'll be able to run the code from Word or when Word is active, for I suspect that Word.officeUI will be locked. So you could try running it from Excel, for example, after closing Word.
Code: Select all
Sub Test() Dim fso As Object Dim strProfile As String Dim strPath1 As String Dim strPath2 As String Dim fil1 As Object Dim fil2 As Object Set fso = CreateObject("Scripting.FileSystemObject") strProfile = Environ("UserProfile") strPath1 = strProfile & "\DropBox\Word.officUI" Set fil1 = fso.GetFile(strPath1) strPath2 = strProfile & "\AppData\Local\Microsoft\Office\Word.officeUI" Set fil2 = fso.GetFile(strPath2) If fil1.DateLastModified < fil2.DateLastModified Then fso.CopyFile strPath2, strPath1, True ElseIf fil1.DateLastModified < fil2.DateLastModified Then fso.CopyFile strPath1, strPath2, True End If End Sub
-
- Administrator
- Posts: 78574
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Is Word.officeUI unamenable to Window's hard link?
Sorry, there was another typo in the code. I have now corrected it, and I have also tested it. It works, even from within Word.
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 437
- Joined: 05 Nov 2012, 20:02
Re: Is Word.officeUI unamenable to Window's hard link?
Yes, it works!HansV wrote:Sorry, there was another typo in the code. I have now corrected it, and I have also tested it. It works, even from within Word.
I think it's the closest thing to user settings-syncro we can pull off under Word's current architecture.
Thanks!