ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   File path... (https://www.excelbanter.com/excel-programming/361323-file-path.html)

ChrisMattock[_13_]

File path...
 

Me again!

Just attempted to roll out my spreadsheet/word template to som
colleagues and have a problem with the path that the word template i
being loaded up from and the path wheer the file is saved.

Dim appWD As Word.Application
Set appWD = CreateObject("word.application.8")
appWD.Visible = True
appWD.Documents.Open FileName:="H:\LOA Stuff\TEST\LOA_Template.doc"

The path I want to save it to works fine on my computer and i
accessible from others however the drive letters differ machine t
machine.. any way ruond this? I tried omitting the path....

LOA_Template.doc

And having the template in the same directory as the excel file callin
it, but this didn't seem to work. (See my other posts for the full cod
:D

--
ChrisMattoc
-----------------------------------------------------------------------
ChrisMattock's Profile: http://www.excelforum.com/member.php...fo&userid=3391
View this thread: http://www.excelforum.com/showthread.php?threadid=54155


AA2e72E

File path...
 
You could save it h

application.options.DefaultFilePath(wdUserTemplate sPath)

i.e each user will have to save your file at the location indicated by the
above expression; run it in the Immediate Window

?application.options.DefaultFilePath(wdUserTemplat esPath)


[email protected]

File path...
 
use the PROPER location of the file (technically the UNC path) get if H
is PROD on SERVER then type

\\server\prod\loa stuff\etc

as the file path - this way, it will EVEN work if the path isn't mapped
to a drive!



All times are GMT +1. The time now is 10:45 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com