Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2016, 04:55 AM
emmanpelayo emmanpelayo is offline Word help Windows 7 64bit Word help Office 2010 64bit
Novice
Word help
 
Join Date: Jul 2015
Posts: 22
emmanpelayo is on a distinguished road
Default Word help

Someone has done this coding for me before. Very very thankful to Paul!! However, I needed to revise the report, so here I am again. I have attached the file, and what I am aiming for is in the comments in review. I am hopeless at this. Please can someone help me? Thanks!
Attached Files
File Type: docm DRAFT Ascot Report.docm (135.3 KB, 9 views)
Reply With Quote
  #2  
Old 06-30-2016, 12:26 PM
macropod's Avatar
macropod macropod is offline Word help Windows 7 64bit Word help 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

For the first problem, you could edit the macro, changing:
If (i = 1) Or (i = .Tables.Count) Then Exit Sub
to:
If (i < 4) Or (i = .Tables.Count) Then Exit Sub

It's not clear what you want regarding the second problem. It seems to me the code already does that.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-09-2016, 06:58 AM
emmanpelayo emmanpelayo is offline Word help Windows 7 64bit Word help Office 2010 64bit
Novice
Word help
 
Join Date: Jul 2015
Posts: 22
emmanpelayo is on a distinguished road
Default

Thanks, Paul. After that change, The red parts are sorted. But for the Green ones, only the second to fourth set of tables work when I click the "add new SBAR set". I've made 5 sets of the tables in this file. 1st and 5th sets are not working. Thanks again!
Attached Files
File Type: docm DRAFT Mercy Report.docm (484.0 KB, 10 views)
Reply With Quote
  #4  
Old 07-10-2016, 12:37 PM
macropod's Avatar
macropod macropod is offline Word help Windows 7 64bit Word help 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

IIRC, the original code was for a document that had a final table after all the input tables. Therefore the macro was coded to ignore the last table. I also didn't notice that the 'Comments' cell was part of the table above. To handle the new arrangement, change:
If (i < 4) Or (i = .Tables.Count) Then Exit Sub
to:
If (i < 3) Then Exit Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 07-11-2016, 09:41 PM
emmanpelayo emmanpelayo is offline Word help Windows 7 64bit Word help Office 2010 64bit
Novice
Word help
 
Join Date: Jul 2015
Posts: 22
emmanpelayo is on a distinguished road
Default

Thanks!!!! All working now! You're a legend!!!
Reply With Quote
  #6  
Old 07-15-2016, 03:21 AM
emmanpelayo emmanpelayo is offline Word help Windows 7 64bit Word help Office 2010 64bit
Novice
Word help
 
Join Date: Jul 2015
Posts: 22
emmanpelayo is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
IIRC, the original code was for a document that had a final table after all the input tables. Therefore the macro was coded to ignore the last table. I also didn't notice that the 'Comments' cell was part of the table above. To handle the new arrangement, change:
If (i < 4) Or (i = .Tables.Count) Then Exit Sub
to:
If (i < 3) Then Exit Sub
I have one last request. I was hoping you could help again Paul... Please see the comment inserted. Thanks again!!!
Attached Files
File Type: docm DRAFT Mercy Report.docm (121.2 KB, 7 views)
Reply With Quote
  #7  
Old 08-14-2016, 11:27 AM
macropod's Avatar
macropod macropod is offline Word help Windows 7 64bit Word help 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

See attached. I've been O/S for the past month, so haven't had a chance to address this before now.
Attached Files
File Type: docm DRAFT Mercy Report.docm (119.0 KB, 11 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Other Forums: Access Forums

All times are GMT -7. The time now is 10:00 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