View Single Post
 
Old 07-24-2021, 06:52 PM
roadwarrior99 roadwarrior99 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2021
Posts: 1
roadwarrior99 is on a distinguished road
Default Trouble using coding for Macro to join tables from directory merger

Hi! I really need help figuring out what codes to use when joining tables from a direct merger. So far I've copied a couple of codes from someone online but it's not quite what I need in the macro. In fact, when I changed the macro the tables remained the same. Ugh. I'm so frustrated

This is what I used:

Sub UpdateAll()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType <> wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
lbl_Exit:
Set oStory = Nothing
Exit Sub
End Sub

However, I only need one header and no extra rows in between the tables. That's all I need to complete this project. I'm definitely not an expert

Please Help anybody!
Attached Images
File Type: jpg direct merger issue.jpg (104.3 KB, 7 views)
Reply With Quote