Opening Template

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
 
S

Srinath

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
 
J

Jake Marx

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top