Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 09-02-2018, 02:34 PM
macropod's Avatar
macropod macropod is offline Merge the first row in a table Windows 7 64bit Merge the first row in a table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
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

The code adds a row to the table, splits that off, merges its cells, then replicates the row at the top of the table, before deleting it and filling the new row at the top of the table with the 'Attachment' text.

It would have been helpful if you had said you only wanted to process two specific tables. You could simply add an If test to the 'With Tbl' block to check what the preceding paragraph contains. For example:
Code:
  With Tbl
    If .Range.Characters.First.Previous.Paragraphs.Last.Range.Text Like "Attachment [3-4]" & vbCr Then
      ...
    End If
  End With
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge the first row in a table How do I mail merge records into table columns with more than one merge field? tech123 Mail Merge 1 04-26-2017 07:13 PM
Merge the first row in a table Table Merge murazlan Mail Merge 3 11-21-2016 08:05 PM
Merge the first row in a table Merge only the text in a table and keep the 2 original colums of a table james1979uk Word Tables 5 12-15-2013 05:48 PM
Cannot Merge Into A Table MacDee Mail Merge 1 01-29-2013 07:21 PM
Merge the first row in a table Merge Two Table in VBA donbexcel Word VBA 2 10-21-2011 11:46 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:40 PM.


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