Macro to copy excel to word

  • Thread starter Daniel R. Young
  • Start date
D

Daniel R. Young

I have a macro that will copy cells from excel to word, but when it copies
the cells that i have no formating borders in excel will show a border in
word. How do I make it so that word will not show the invisible borders?

Here is my code:
Set rng1 = rng.SpecialCells(xlCellTypeVisible)

rng1.Select

Selection.Copy 'Copy to clipboard



Dim WDApp As Object

Dim WDDoc As Object

Dim myDocName As String



myDocName = "Survey Report.doc"



Set WDApp = CreateObject("Word.Application")

WDApp.Visible = True



Set WDDoc = WDApp.documents.Open("F:\Survey Test\Word\Survey Report.doc")

WDDoc.Selection.Paste
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top