help with copy and paste formating

josephll

Board Regular
Joined
Nov 8, 2008
Messages
51
I have built, used others mostly, code that copies a spreadsheet range into lotus notes through MS word. Everything works well, I am just trying to fine tune the formating to make it look better in the email. (Everyone from the CEO down to my immediate boss sees this email.) The range has 67 rows in it some have a value some are blank. The problem lies in copying the blank rows, there are formulas in some of these rows but no values, creating a a lot of space between lines once it is pasted into word.

Here is the copy and paste I am using:

HTML:
 Sheets("Summary").Range("b2:t67").Copy.SpecialCells (xlCellTypeVisible)
 
        'Create a temporary Word Document
 
        Set WordApp = CreateObject("Word.Application")
        WordApp.Visible = True                                 'True to aid debugging
        WordApp.Documents.Add
 
        'Paste into Word document and copy to clipboard
 
        With WordApp.Selection
            .PasteSpecial DataType:=2      'Enum WdPasteDataType: 10 = HTML; 2 = Text; 1 = RTF this was a big help
            .WholeStory
            .Copy
        End With
        'Paste from clipboard (Word) to Lotus Notes document
        .Paste
        Application.CutCopyMode = False
Is there a change I can make to the code that will help?
Thank you for all your help so far with this project. I am sure someone on here can fix me.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
No help yet? I was convinced this would be an easy fix.
Could this be done by removing rows when copying?
I am excited to see what creative solutions you, the experts, can come up with. My limited abilities area exhausted.:(
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top