Opening Template

  • Thread starter Thread starter Srinath
  • Start date Start date
S

Srinath

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
 
Hello Jake,

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

SSR



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
 
Hi SSR,

Srinath said:
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
 
Back
Top