![]() |
|
#10
|
|||
|
|||
|
Hi,
I attached the output of the macro, I assumed as the following is the VB script to merge the "Tables". Merging to Tables Any of the previous examples can produce their output in a table format. All you need to do is to replace the heading & data lines in the field code with an equivalent table. When you do so, however, each record becomes a one-row table, as per the ‘Calculating Group and Sub-Group Totals’ example (page 14). To turn that output into one table per group you can run the following ‘TableJoiner’ macro after completing the merge. Sub TableJoiner() Application.ScreenUpdating = False Dim oPara As Paragraph For Each oPara In ActiveDocument.Paragraphs With oPara.Range If .Information(wdWithInTable) = True Then With .Next If .Information(wdWithInTable) = False Then If .Text = vbCr Then .Delete End If End With End If End With Next Application.ScreenUpdating = True End Sub Regards, Ali Mubarak |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Printing a letter sized document that contains an envelope page | CyberChulo | Word | 5 | 11-01-2017 04:47 AM |
Printing Document Title Automatically
|
Khans_nytorv | Word | 3 | 06-14-2016 07:45 PM |
How to add letter head picture to a section for printing
|
juliem | Word | 4 | 10-12-2015 08:54 PM |
| Word documents all are now printing in the top right corner as well as cutting off some printing | MattyJ | Word | 2 | 03-20-2015 10:15 AM |
| Non-Printing Graphics vs Printing | v_kiviranna | Drawing and Graphics | 4 | 06-29-2010 07:04 AM |