Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2024, 03:42 PM
Guessed's Avatar
Guessed Guessed is offline Macro/VBA to copy text paragraph and insert as new row in summary table, with RAG Windows 10 Macro/VBA to copy text paragraph and insert as new row in summary table, with RAG Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

If your H/M/L tables are always appearing in that order at the top of the document then your macros might work like this


Code:
Sub MoveIt_High()
  ILikeToMoveIt
End Sub

Sub MoveIt_Medium()
  ILikeToMoveIt 2
End Sub

Sub MoveIt_Low()
  ILikeToMoveIt 3
End Sub

Function ILikeToMoveIt(Optional iTbl As Integer = 1)
  Dim aRng As Range, aTbl As Table, aRow As Row
  Set aRng = Selection.Paragraphs(1).Range
  aRng.End = aRng.End - 1
  Set aTbl = ActiveDocument.Tables(iTbl)
  Set aRow = aTbl.Rows.Add
  aRow.Cells(1).Range.FormattedText = aRng.FormattedText
End Function
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro/VBA to copy text paragraph and insert as new row in summary table, with RAG Word macro to insert text at the beginning of paragraph but skip tables ashalles135 Word VBA 5 09-26-2018 09:49 AM
Macro/VBA to copy text paragraph and insert as new row in summary table, with RAG word macro To insert text at the beginning and at end of paragraph ArieH Word VBA 20 09-10-2017 04:23 PM
Macro/VBA to copy text paragraph and insert as new row in summary table, with RAG Creating paragraph macro transform text into table celiolopes Word VBA 2 08-25-2016 04:03 PM
Macro/VBA to copy text paragraph and insert as new row in summary table, with RAG Macro to Insert text into the beginning on specific paragraphs unless the paragraph is blank caboy Word VBA 2 04-01-2015 07:00 AM
Insert table in document - automatically updates second table in summary? Mechanic Word 2 08-01-2012 09:44 PM

Other Forums: Access Forums

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