Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Command Failed in Word Interop - Selection.PasteExcelTable
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Command Failed in Word Interop - Selection.PasteExcelTable
Divers
Thread ID:
01644800
Message ID:
01644800
Vues:
37
I prepare a table in Excel within a Using () statement. 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.

I tried the Activate method of the Word.Application object and also when I wait for 5 seconds after the Activate().

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform