Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-18-2019, 06:53 AM
sts023 sts023 is offline Inserting a Table using VBA Windows 7 64bit Inserting a Table using VBA Office 2010
Hopeless Idiot
Inserting a Table using VBA
 
Join Date: Apr 2019
Location: God's Own County
Posts: 26
sts023 is on a distinguished road
Default Inserting a Table using VBA

Hi guys...
I have a document on which there is a specific table.
I want to copy that table "as is" to another document, but WITHOUT using the clipboard.
I can save the table in a variable Dim'd as Word.Table, but I dont know how to insert that table into another document.
I can't find an "Activedocument.Tables.Insert" with a table as an operand; all I've found is the "ActiveDocument.Tables.Add", which doesn't seem to have the facility to have a table variable as an operand.
I know I could extract the dimensions, formats and contents and use those details to "Add" and then populate the new table, but that's one great lump of coding I'd like to avoid.
Surely if I can code
Code:
Dim tbl                     As Word.Table
  Set tbl = ActiveDocument.Tables(1)
then there must be something like


Code:
Dim tbl                     As Word.Table
  ActiveDocument.Tables.insert(tbl)
isn't there?
Can ayone help?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
syntax for inserting blank line before inserting table and after a line or paragraph SamDsouza Word VBA 8 08-04-2019 11:10 PM
Inserting graphic in last table lodi123 Word VBA 2 07-07-2017 06:48 AM
Inserting a Table using VBA Inserting a table using ADD command snufse Word VBA 1 11-10-2015 03:28 PM
Inserting a Table using VBA Inserting table natasha_arriell Mail Merge 4 06-04-2014 12:13 AM
Inserting a table Katelyn Outlook 0 04-05-2012 09:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:47 AM.


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