View Single Post
 
Old 08-18-2019, 07:58 AM
gmaxey gmaxey is offline Windows 10 Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oDoc1 As Document
Dim oDoc2 As Document
Dim oRng As Range, oRngInsert As Range
  Set oDoc1 = ActiveDocument 'The one with the table
  Set oDoc2 = Documents.Add 'Some other document
  
  Set oRng = oDoc1.Tables(1).Range
  Set oRngInsert = oDoc2.Range
  oRngInsert.Collapse wdCollapseEnd
  oRngInsert.FormattedText = oRng.FormattedText
lbl_Exit:
  Exit Sub
  
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote