#1
|
|||
|
|||
Table Merge _ Auto Delete Blank Lines (without Data)
Hello to everyone.
Please can you help me with the auto-deletion of the blank lines in a table like that? |
#2
|
||||
|
||||
Why are you creating such tables? That said, see:
https://www.msofficeforums.com/118466-post2.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you very much.
please see the attached photo of the table |
#4
|
|||
|
|||
I would like make another question about the currency format.
As you can see the the format i want to have is the very Greek #.#,00 € But excel gives me the #,#.00 € as a greek format. Ι am running the English office version and i can't find a way to modify the format. Can you help me? |
#5
|
||||
|
||||
Try:
Code:
Sub MailMergeToDoc() Application.ScreenUpdating = False Dim Tbl As Table, c As Long, r As Long, StrVal As String ActiveDocument.MailMerge.Execute For Each Tbl In ActiveDocument.Tables With Tbl For r = .Rows.Count To 1 Step -1 If Len(.Rows(r).Range.Text) = .Rows(r).Cells.Count * 2 + 2 Then .Rows(r).Delete Else For c = 3 To 4 StrVal = Split(.Cell(r, c).Range.Text, vbCr)(0) If InStr(StrVal, "") > 0 Then StrVal = Replace(Replace(Replace(StrVal, ".", "|"), ",", "."), "|", ",") .Cell(r, c).Range.Text = StrVal End If Next End If Next End With Next Application.ScreenUpdating = True End Sub For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#6
|
|||
|
|||
Hi,
you are the best This macro is very helpful and it works perfect in all the fields except one(pls see the pic). Is there any limitation in the macro? I use the \#00.00,€ format in the mergefileds and my table has maximum 12 rows. My data in excel is in the € Euro (123 €) --> "#,##0.00 [$€-x-euro1]_);(#,##0.00 [$€-x-euro1])" format |
#7
|
||||
|
||||
I am unable to replicate the behaviour to say is happening. The macro is not limited in the number of rows it can process. As per your table specification in post #3, however, only columns 3 and 4 are processed. The problem may be the result of your last row having the first two columns merged, but it's not apparent from the image you posted whether that is the case or there's just no border there.
PS: Kindly stop posting oversize images - we're not blind and all you're achieving is making your posts harder to read. I have resized your images to something more sensible.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
Thanks for your reply.
Please accept my apologies for the oversized images. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blank Lines in Mail Merge - Other Options not working | cluyster1127 | Mail Merge | 13 | 12-11-2019 01:05 PM |
Removing Lines / Tables with Blank Data | Crosby87 | Mail Merge | 33 | 07-16-2019 02:24 AM |
I am getting blank lines with Mail Merge | rtcary | Mail Merge | 1 | 01-20-2018 02:07 PM |
Select and Delete 2 lines after each blank line | Ziad El Hachem | Word VBA | 4 | 03-21-2017 06:55 PM |
Eliminating blank lines in mail merge (labels) | BeerStud | Mail Merge | 1 | 11-28-2014 06:29 PM |