View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Daniel R. Young Daniel R. Young is offline
external usenet poster
 
Posts: 38
Default Macro to copy excel and paste in word

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