ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening Template (https://www.excelbanter.com/excel-programming/275445-opening-template.html)

Srinath

Opening Template
 
Hello,

When an Word Template is Opened by Double clicking in the explorer window it
creates a .doc File which is then to be saved . How can this be acheived if
I use Automation through Excel. I am Able to open the Template but it opens
the .dot file and not the .doc file without name

Regards
SSR



Srinath

Opening Template
 
Hello Jake,

Well I had asked about .dot but anyway the Idea works even in that Thanks

SSR



"Jake Marx" wrote in message
...
Hi SSR,

You should use the Add method of the Workbooks collection to create a new
Workbook based on a template. For example:

Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook

Set xlApp = New Excel.Application
Set xlWB = xlApp.Workbooks.Add("mytemplate.xlt")

MsgBox xlWB.Name

xlWB.Close False
Set xlWB = Nothing
xlApp.Quit
Set xlApp = Nothing

Regards,

Jake Marx
MS MVP - Excel


"Srinath" wrote in message
...
Hello,

When an Word Template is Opened by Double clicking in the explorer window

it
creates a .doc File which is then to be saved . How can this be acheived

if
I use Automation through Excel. I am Able to open the Template but it

opens
the .dot file and not the .doc file without name

Regards
SSR






Jake Marx

Opening Template
 
Hi SSR,

"Srinath" wrote in message
...
Hello Jake,

Well I had asked about .dot but anyway the Idea works even in that Thanks


Well, yes you did! Sorry for the misinterpretation. But as you found out,
the Add method of the Documents collection works the same way. So I wasn't
totally off-base. <g

Regards,

Jake Marx
MS MVP - Excel




All times are GMT +1. The time now is 03:28 AM.

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