Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-23-2014, 12:42 PM
landonminden landonminden is offline VBA FileCopy Source: problem Windows 7 64bit VBA FileCopy Source: problem Office 2010 64bit
Novice
VBA FileCopy Source: problem
 
Join Date: Sep 2014
Posts: 2
landonminden is on a distinguished road
Default 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.
Reply With Quote
 

Tags
filecopy, vba, xml



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot open the source object Satish1985 Excel 0 02-06-2014 08:32 PM
VBA FileCopy Source: problem Create DDL from Excel source BradleyS Word 1 01-30-2013 10:58 PM
Cannot find source of overallocation nesskramer Project 3 06-29-2012 08:46 AM
VBA FileCopy Source: problem editing source formatting urboyfriend Word 1 09-22-2011 02:43 AM
VBA FileCopy Source: problem Installation Source Corrupted browneyes Office 1 01-23-2006 02:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:55 PM.


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