Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
AW AW is offline
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a Word Template from within Excel perry Excel Discussion (Misc queries) 0 January 30th 07 12:23 PM
Opening a Word template from excel RealmSteel Excel Discussion (Misc queries) 3 November 29th 06 09:16 PM
Opening word document through excel vba srinums Excel Discussion (Misc queries) 0 June 8th 06 12:02 PM
Opening Word Document with excel [email protected] Excel Discussion (Misc queries) 0 March 21st 05 01:49 AM
opening a word document from excel chris Excel Programming 5 April 1st 04 03:17 PM


All times are GMT +1. The time now is 06:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"