VBA FileCopy Source: problem
I am trying to copy a template (Normal.dotm) from a server to desktop template folder using VBA.
The file I want to copy has xml (custom tabs) however when I run the code it copies the file but it doesnt bring the xml with the file.
If I physically copy the file it works fine and the tabs are there when I open it.
Here is the code I have copying the file to my roaming folder:
Sub copyfile()
'
MsgBox VBA.Environ("username")
Dim UserName As String
UserName = VBA.Environ("username")
Options.DefaultFilePath(Path:=wdUserTemplatesPath) = "C:\users\" & UserName & "\appdata\roaming\Microsoft\Templates"
FileCopy Source:="\\ggnnd\GROUP\PLNG\Normal.dotm", Destination:="C:\users\" & UserName & "\appdata\roaming\Microsoft\Templates\Normal.d otm"
End Sub
Do I need a macro to copy the xml somehow I couldnt find anything on the internet.
Any Help would be much appreciated.
|