ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Distribute XLT - don't want to do it individually on each machine (https://www.excelbanter.com/excel-programming/348422-distribute-xlt-dont-want-do-individually-each-machine.html)

Sandy

Distribute XLT - don't want to do it individually on each machine
 
Hello -

I have a document that should be distributed as a template document on
individual machines which will go on C:\Documents and
Settings\Administrator\Application Data\Microsoft\Templates\DocumentName.xlt.

I don't want to have to manually put it on each machine. Is there a
textbook example of how to do this in code? I could email them a document
that has a button on it that will save the template when they click it, but
then each time an instance of a template is loaded, the button will be there
again. I know I am not thinking this through correctly, but it's getting
late . . .

Any help will be greatly appreciated!
--
Sandy

chijanzen

Distribute XLT - don't want to do it individually on each machine
 

you can make a Install file and copy DocumentName.xlt to Excel Templates path

try,

SourceFile = Application.TemplatesPath & "\DocumentName.xlt"
DestinationFile = ThisWorkbook.Path & "\DocumentName.xlt"
FileCopy SourceFile, DestinationFile


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Sandy" wrote:

Hello -

I have a document that should be distributed as a template document on
individual machines which will go on C:\Documents and
Settings\Administrator\Application Data\Microsoft\Templates\DocumentName.xlt.

I don't want to have to manually put it on each machine. Is there a
textbook example of how to do this in code? I could email them a document
that has a button on it that will save the template when they click it, but
then each time an instance of a template is loaded, the button will be there
again. I know I am not thinking this through correctly, but it's getting
late . . .

Any help will be greatly appreciated!
--
Sandy


NickHK

Distribute XLT - don't want to do it individually on each machine
 
Sandy,
If everyone is on the same network, you can ensure that their Office setting
"Workgroup Templates" points to a common location, then these template will
appear (along with local templates) when the select New..

Whilst Excel does not expose this setting (for some reason) other Office
components do.
So you can automate Word or make the necessary registry changes directly.

NickHK

"Sandy" wrote in message
...
Hello -

I have a document that should be distributed as a template document on
individual machines which will go on C:\Documents and
Settings\Administrator\Application

Data\Microsoft\Templates\DocumentName.xlt.

I don't want to have to manually put it on each machine. Is there a
textbook example of how to do this in code? I could email them a document
that has a button on it that will save the template when they click it,

but
then each time an instance of a template is loaded, the button will be

there
again. I know I am not thinking this through correctly, but it's getting
late . . .

Any help will be greatly appreciated!
--
Sandy




Sandy

Distribute XLT - don't want to do it individually on each mach
 
Hi Chijanzen:

Thanks for your response. What do you mean by "make an install file"? Can
you be more specific?

Thanks.
--
Sandy


"chijanzen" wrote:


you can make a Install file and copy DocumentName.xlt to Excel Templates path

try,

SourceFile = Application.TemplatesPath & "\DocumentName.xlt"
DestinationFile = ThisWorkbook.Path & "\DocumentName.xlt"
FileCopy SourceFile, DestinationFile


--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Sandy" wrote:

Hello -

I have a document that should be distributed as a template document on
individual machines which will go on C:\Documents and
Settings\Administrator\Application Data\Microsoft\Templates\DocumentName.xlt.

I don't want to have to manually put it on each machine. Is there a
textbook example of how to do this in code? I could email them a document
that has a button on it that will save the template when they click it, but
then each time an instance of a template is loaded, the button will be there
again. I know I am not thinking this through correctly, but it's getting
late . . .

Any help will be greatly appreciated!
--
Sandy


Sandy

Distribute XLT - don't want to do it individually on each mach
 
Hi Nick -

Thanks for responding! That would still entail setting a path on each
machine, wouldn't it?

--
Sandy


"NickHK" wrote:

Sandy,
If everyone is on the same network, you can ensure that their Office setting
"Workgroup Templates" points to a common location, then these template will
appear (along with local templates) when the select New..

Whilst Excel does not expose this setting (for some reason) other Office
components do.
So you can automate Word or make the necessary registry changes directly.

NickHK

"Sandy" wrote in message
...
Hello -

I have a document that should be distributed as a template document on
individual machines which will go on C:\Documents and
Settings\Administrator\Application

Data\Microsoft\Templates\DocumentName.xlt.

I don't want to have to manually put it on each machine. Is there a
textbook example of how to do this in code? I could email them a document
that has a button on it that will save the template when they click it,

but
then each time an instance of a template is loaded, the button will be

there
again. I know I am not thinking this through correctly, but it's getting
late . . .

Any help will be greatly appreciated!
--
Sandy





NickHK

Distribute XLT - don't want to do it individually on each mach
 
Sandy,
Yes, but it's a one-off change.
Whatever method you choose, you have to contact/edit/change something at
least once.

If you edit the registry:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Co mmon\General\SharedTemplat
es

no user interaction is required.
Then any update to the template just means you have to replace it at one
location.

NickHK

"Sandy" wrote in message
...
Hi Nick -

Thanks for responding! That would still entail setting a path on each
machine, wouldn't it?

--
Sandy


"NickHK" wrote:

Sandy,
If everyone is on the same network, you can ensure that their Office

setting
"Workgroup Templates" points to a common location, then these template

will
appear (along with local templates) when the select New..

Whilst Excel does not expose this setting (for some reason) other Office
components do.
So you can automate Word or make the necessary registry changes

directly.

NickHK

"Sandy" wrote in message
...
Hello -

I have a document that should be distributed as a template document on
individual machines which will go on C:\Documents and
Settings\Administrator\Application

Data\Microsoft\Templates\DocumentName.xlt.

I don't want to have to manually put it on each machine. Is there a
textbook example of how to do this in code? I could email them a

document
that has a button on it that will save the template when they click

it,
but
then each time an instance of a template is loaded, the button will be

there
again. I know I am not thinking this through correctly, but it's

getting
late . . .

Any help will be greatly appreciated!
--
Sandy








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

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