Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-28-2020, 11:47 PM
Alex1s85 Alex1s85 is offline Table Merge _ Auto Delete Blank Lines (without Data) Windows 10 Table Merge _ Auto Delete Blank Lines (without Data) Office 2016
Advanced Beginner
Table Merge _ Auto Delete Blank Lines (without Data)
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default 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?
Reply With Quote
  #2  
Old 04-29-2020, 12:14 AM
macropod's Avatar
macropod macropod is online now Table Merge _ Auto Delete Blank Lines (without Data) Windows 7 64bit Table Merge _ Auto Delete Blank Lines (without Data) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Why are you creating such tables? That said, see:
https://www.msofficeforums.com/118466-post2.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-29-2020, 12:37 AM
Alex1s85 Alex1s85 is offline Table Merge _ Auto Delete Blank Lines (without Data) Windows 10 Table Merge _ Auto Delete Blank Lines (without Data) Office 2016
Advanced Beginner
Table Merge _ Auto Delete Blank Lines (without Data)
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

Thank you very much.

please see the attached photo of the table
Attached Images
File Type: jpg table.jpg (47.0 KB, 26 views)
Reply With Quote
  #4  
Old 04-29-2020, 12:43 AM
Alex1s85 Alex1s85 is offline Table Merge _ Auto Delete Blank Lines (without Data) Windows 10 Table Merge _ Auto Delete Blank Lines (without Data) Office 2016
Advanced Beginner
Table Merge _ Auto Delete Blank Lines (without Data)
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

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?
Reply With Quote
  #5  
Old 04-29-2020, 11:49 PM
macropod's Avatar
macropod macropod is online now Table Merge _ Auto Delete Blank Lines (without Data) Windows 7 64bit Table Merge _ Auto Delete Blank Lines (without Data) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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 PC macro installation & usage instructions, see: Installing Macros
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 05-04-2020, 03:40 AM
Alex1s85 Alex1s85 is offline Table Merge _ Auto Delete Blank Lines (without Data) Windows 10 Table Merge _ Auto Delete Blank Lines (without Data) Office 2016
Advanced Beginner
Table Merge _ Auto Delete Blank Lines (without Data)
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

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


Attached Images
File Type: jpg pic.jpg (44.0 KB, 25 views)
Reply With Quote
  #7  
Old 05-04-2020, 05:07 AM
macropod's Avatar
macropod macropod is online now Table Merge _ Auto Delete Blank Lines (without Data) Windows 7 64bit Table Merge _ Auto Delete Blank Lines (without Data) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #8  
Old 05-04-2020, 05:12 AM
Alex1s85 Alex1s85 is offline Table Merge _ Auto Delete Blank Lines (without Data) Windows 10 Table Merge _ Auto Delete Blank Lines (without Data) Office 2016
Advanced Beginner
Table Merge _ Auto Delete Blank Lines (without Data)
 
Join Date: Oct 2019
Location: Thessaloniki, Greece
Posts: 30
Alex1s85 is on a distinguished road
Default

Thanks for your reply.



Please accept my apologies for the oversized images.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Merge _ Auto Delete Blank Lines (without Data) Blank Lines in Mail Merge - Other Options not working cluyster1127 Mail Merge 13 12-11-2019 01:05 PM
Table Merge _ Auto Delete Blank Lines (without Data) Removing Lines / Tables with Blank Data Crosby87 Mail Merge 33 07-16-2019 02:24 AM
Table Merge _ Auto Delete Blank Lines (without Data) I am getting blank lines with Mail Merge rtcary Mail Merge 1 01-20-2018 02:07 PM
Table Merge _ Auto Delete Blank Lines (without Data) Select and Delete 2 lines after each blank line Ziad El Hachem Word VBA 4 03-21-2017 06:55 PM
Table Merge _ Auto Delete Blank Lines (without Data) Eliminating blank lines in mail merge (labels) BeerStud Mail Merge 1 11-28-2014 06:29 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft