PerplexedB 2 Newbie Poster

I prepare a table in Excel within a Using () statetement. At the end I UsedRange.Copy() to what I understand is the clipboard. Then I Selection.PasteExcelTable in a Word document.
I get an COM Exception "command failed".
When I activate the word document and press Ctrl+V the table gets copied.
I wonder if that has something to do with the fact that maybe I must reactivate the Word document in code.

The word document gets created also within a Using() statement. I execute the Excel procedure from within the Using(Word) statement.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.