Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, Jim. The margins for this will not change.
What is the "400"? Points? Or just an arbitrary number used for measurement according to whatever Excel is using? Ed On Apr 1, 12:49*pm, Jim Thomlinson <James_Thomlin...@owfg-Re-Move- This-.com wrote: You are going to have certain difficulties with this as it depends on the margins you set in Word. When those change your code will need to change. Here is some simple code to get you started. It does not look at the margins in Word... Sub test() * * Dim dbl As Double * * Dim rng As Range * * Dim rngToSearch As Range * * Set rngToSearch = Range("A1", Cells(Rows.Count, "A").End(xlUp)) * * For Each rng In rngToSearch * * * * dbl = dbl + rng.Height * * * * If dbl 400 Then 'You will need to change this to suit * * * * * * MsgBox rng.Address * * * * * * dbl = 0 * * * * End If * * Next rng End Sub -- HTH... Jim Thomlinson "Ed from AZ" wrote: (Word and Excel 2003) *I have an Excel table that my code scans, picks so many rows, and then copies that into a Word document as a table. This worked okay when all my rows were a single fixed height. *I've just received instructions to add some info items to this table, which will increase some row sizes due to word wrap. Is there a good way to determine how many rows will fit inside the margins of my Word page? *Perhaps add the height of each row until I get to a certain number? *Or can I detect and use the page break somehow for this? Ed- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Saving Excel 2010 files as web page or single file web page | Excel Discussion (Misc queries) | |||
colating multi rows of data into single rows - no to pivot tables! | Excel Worksheet Functions | |||
how do you print single page multiply times with increasing page . | Excel Worksheet Functions | |||
Page numbers on copies of a single page worksheet | Excel Discussion (Misc queries) | |||
Printing multiple page worksheets on 1 single page | Excel Discussion (Misc queries) |