Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VBA- how retrieve source dir for the template *.xlt file ?

welcome.


I have a template file test.xlt existing in some dir other than excel
templates dir.
When the file is launched new workbook is created and i want to autosave it
in a dir
where the test.xlt file exists.
Due to fact that instance of the file test.xlt does not longer exists i cant
get source dir.

I would be thankful for any hint.

PS.
i have used a tip that every single file launched makes its mark in a
windows recent directory,
so i found a link file (test.xlt.lnk) but a dont know how to retrieve target
dir from it.
Maybe this way ?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default VBA- how retrieve source dir for the template *.xlt file ?

Post the code. This is real easy to fix. You just need some minor
modification to your code.

"Przemek" wrote:

welcome.


I have a template file test.xlt existing in some dir other than excel
templates dir.
When the file is launched new workbook is created and i want to autosave it
in a dir
where the test.xlt file exists.
Due to fact that instance of the file test.xlt does not longer exists i cant
get source dir.

I would be thankful for any hint.

PS.
i have used a tip that every single file launched makes its mark in a
windows recent directory,
so i found a link file (test.xlt.lnk) but a dont know how to retrieve target
dir from it.
Maybe this way ?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VBA- how retrieve source dir for the template *.xlt file ?


Post the code. This is real easy to fix. You just need some minor
modification to your code.


Just tell me where to use and what methode/property.

I've tested the problem with empty test.xlt file with no code.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default VBA- how retrieve source dir for the template *.xlt file ?

I don't have enough info to give good reults. Give more details.

"Przemek" wrote:


Post the code. This is real easy to fix. You just need some minor
modification to your code.


Just tell me where to use and what methode/property.

I've tested the problem with empty test.xlt file with no code.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default VBA- how retrieve source dir for the template *.xlt file ?


I don't have enough info to give good reults. Give more details.


the template file test.xlt HAS NO CODE, i cant give U more details bcoz
there are no details.

after launching XLT file it creates a copy of itself named "test1.xls".
Thats how template files works.
Unfortunately this copy of xlt file isnt saved,
and i need to save it into a directory where the source file "xlt" exists.

But the problem is "how to obtain the source dir".

PS.
Just create an EMPTY *.xlt file. Close Excel. And double click on the
created file.
U will se what i'm talkin ab.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default VBA- how retrieve source dir for the template *.xlt file ?

Create a new workbook with a macro that copies the XLT file and saves it.

"Przemek" wrote:


I don't have enough info to give good reults. Give more details.


the template file test.xlt HAS NO CODE, i cant give U more details bcoz
there are no details.

after launching XLT file it creates a copy of itself named "test1.xls".
Thats how template files works.
Unfortunately this copy of xlt file isnt saved,
and i need to save it into a directory where the source file "xlt" exists.

But the problem is "how to obtain the source dir".

PS.
Just create an EMPTY *.xlt file. Close Excel. And double click on the
created file.
U will se what i'm talkin ab.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default VBA- how retrieve source dir for the template *.xlt file ?

Excel doesn't keep track of where the original template was located.

If you're creating the file based on that template in code, you could keep track
of it yourself.

If you're creating the file based on that template manually, you'll have to find
another way--maybe add a name (and hide it) to the template file that specifies
the path????

Przemek wrote:

welcome.

I have a template file test.xlt existing in some dir other than excel
templates dir.
When the file is launched new workbook is created and i want to autosave it
in a dir
where the test.xlt file exists.
Due to fact that instance of the file test.xlt does not longer exists i cant
get source dir.

I would be thankful for any hint.

PS.
i have used a tip that every single file launched makes its mark in a
windows recent directory,
so i found a link file (test.xlt.lnk) but a dont know how to retrieve target
dir from it.
Maybe this way ?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Link a Master Template Excel file to different excel source files Jean Excel Worksheet Functions 0 August 2nd 07 11:12 PM
If I accidently replace a saved file can I retrieve the old file? kamabiv Excel Discussion (Misc queries) 1 May 11th 05 10:26 PM
Connect a Template with the data source. Bob Excel Programming 1 July 30th 04 08:56 PM
How do I retrieve Chart Source (range) and PlotBy Gilroy Excel Programming 1 June 24th 04 09:23 PM
Need template source path Don DeCosta Excel Programming 2 October 1st 03 03:20 AM


All times are GMT +1. The time now is 10:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"