Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba - opening doc from Excel Vba
Hi all,
Does anybody knows how to open Template.dot from excel Vba? I asume it's something like: ChangeFileOpenDirectory Route Documents.Open Filename:="Template.dot" I think the problem is with References. I tried activating "Microsof Word 11 Object Library" but still doesn't works. Thanks, Aldo -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba - opening doc from Excel Vba
As well as adding in the reference to the Word object library, you need to create an instance of Word and make it visible. Then you can use this Word to open the template. Use code similar to this: ' Declare a variable and set it to an instance of Word Dim Word As New Word.Application ' Make the application visible Word.Visible = True ' Open the document Word.Documents.Open "C:\Templates\template.dot" I've called my variable Word, but it can be anything you like. HTH Helen -----Original Message----- Hi all, Does anybody knows how to open Template.dot from excel Vba? I asume it's something like: ChangeFileOpenDirectory Route Documents.Open Filename:="Template.dot" I think the problem is with References. I tried activating "Microsoft Word 11 Object Library" but still doesn't works. Thanks, Aldo. --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Vba - opening doc from Excel Vba
You want to EDIT a Word template in Excel?
-- John johnf202 at hotmail dot com "ajliaks " wrote in message ... Hi all, Does anybody knows how to open Template.dot from excel Vba? I asume it's something like: ChangeFileOpenDirectory Route Documents.Open Filename:="Template.dot" I think the problem is with References. I tried activating "Microsoft Word 11 Object Library" but still doesn't works. Thanks, Aldo. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I stop blank workbook from opening when opening an existing | Excel Discussion (Misc queries) | |||
Trouble opening large size Excel file 155Mb in Excel 2007 | Excel Discussion (Misc queries) | |||
REF errors when opening excel in xp. works fine when opening wor. | Excel Discussion (Misc queries) | |||
excel VBA problem - setting workbook as variable & opening/re-opening | Excel Programming | |||
Excel recalculates formulas when opening files last saved by an earlier version of Excel | Excel Programming |