• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

Paste Excel Table to Word bookmark

I am trying to automate (vie VBA) copying some Excel tables into a Word document at specific bookmarked locations. The following is a code snippet:

    'this should copy the Excel table to the clipboard
     Range(strRangeName).Copy    

     'this should paste the  clipboard into the word document
     wrdrngBookMark.PasteAndFormat Type:=wdFormatOriginalFormatting  

I am successfully copying charts across with the folowing:
            ActiveChart.ChartArea.Copy
            wrdrngBookMark.PasteAndFormat Type:=wdChartPicture

Please what am I doing wrong with the tables??
0
NormanMitchell
Asked:
NormanMitchell
  • 2
  • 2
1 Solution
 
Arno KosterCommented:
you should be able to  use

wrdrngBookMark.PasteExcelTable False, False, False
0
 
NormanMitchellAuthor Commented:
This solution only worked a couple of times (out of many tries). PasteSpecial appears to work all the time.

Any ideas why PasteExcelTable is unreliable?
0
 
Arno KosterCommented:
0
 
NormanMitchellAuthor Commented:
The solution did not work consistently
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now