Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Don Sims   on Feb 16 In MS Office Category.

  
Question Answered By: Rachael Ferguson   on Feb 16

This is a little bit outside my area of expertise but it seems to me that by
using wapp.NewDocument all you have done is to add  a reference in the task
pane (in a non-visible Word App) to a non existent document. There is
probably no active document  and no selection. You are therefore passing
non-existent parameters to the Tables.Add.

I think an approach may be to dim MyDoc as Word.Doc
Set MyDoc = wapp.Documents.add
Then either use MyDoc.activate
Or use MyDoc.Tables.Add rather than ActiveDocument.Tables.Add

I am sure one of the Word VBA Experts will be able to improve on this

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 


Tagged: