Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel-Opening Word
Hope someone can assist. I have an excel template which when accessed,
opens a workbook. A button in this work book(cmdCCA) is then supposed to access a Word Template and open a doument into which I wish to place some cell values from the work book via a Word UserForm. The code below is fine apart from ".visible=True", The userform in the Word Document is shown, however when trying to proceed, the code falls over a this point, and the Word Document does not show. BUT if running from an .xls and not an .xlt, it will work. I'd appreciate any guidance Al@n Private Sub cmdCCA_Click() Dim appWD As Object Dim MyDoc As Object Set appWD = CreateObject("Word.Application") With appWD Set MyDoc = .documents.Add(Template:= _ "C:\Documents and Settings\Alan\Desktop\Test1\CCS1.dot", _ NewTemplate:=False, DocumentType:=0) MyDoc.Activate ..visble = True End With End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening a Word Template from within Excel | Excel Discussion (Misc queries) | |||
Opening a Word template from excel | Excel Discussion (Misc queries) | |||
Opening word document through excel vba | Excel Discussion (Misc queries) | |||
Opening Word Document with excel | Excel Discussion (Misc queries) | |||
opening a word document from excel | Excel Programming |