Excel VBA - Insert Word Table problem
From: PaulC (PaulC.174c11_at_excelforum-nospam.com)
Date: 05/31/04
- Next message: Frank Kabel: "Re: excel: activitaing a macro upon selection of a cell"
- Previous message: arunjoshi: "excel: activitaing a macro upon selection of a cell"
- Next in thread: chris: "RE: Excel VBA - Insert Word Table problem"
- Reply: chris: "RE: Excel VBA - Insert Word Table problem"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 31 May 2004 06:37:51 -0500
I am trying to add a word table into a word document that opens from an
Excel97 macro. Everything works fine until I try to insert the table.
The code is:
Set wdApp = CreateObject("word.application")
wdApp.Documents.Open("C:Attendance _ Note.doc").Application.Visible =
True
With wdApp
Visible = True
With .Selection
TypeText Text:="Attendance Note"
TypeParagraph
Tables.Add Range:=Selection.Range,NumRows:=6, NumColumns:=4
End With
End With
This works except it will not insert the table. What have I missed
out?
Paul
--- Message posted from http://www.ExcelForum.com/
- Next message: Frank Kabel: "Re: excel: activitaing a macro upon selection of a cell"
- Previous message: arunjoshi: "excel: activitaing a macro upon selection of a cell"
- Next in thread: chris: "RE: Excel VBA - Insert Word Table problem"
- Reply: chris: "RE: Excel VBA - Insert Word Table problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|