Forum Discussion
Help with Paste from excel to word
- Sep 22, 2022
Tommaso_Bertocchi I apologize in advance if this makes you cry.
Using Visual Basic in Word, you can add a table to a document using a command such as
The table will be added to the Range, which can be defined in a number of ways. For example if the table was to be added at the end of the document, you would use
Dim NewTable As Table
Dim tblRange As Range
Set tblRange = ActiveDocument.Range
tblRange. Collapse wdCollapseEnd
Set NewTable = ActiveDocument.Tables.Add(tblRange, NumRows, NumColumns, etc)
While you would usually set the tolal number of columns when adding the table, in most cases you would not set the total number of rows as you can simply use
NewTable.Rows.Add
whenever a new row is required.
The following is a listing of the members of the Table class
As an example, this is a screen shot of onw of the tables in an 1100 page document that was created, populated with text and formatted using a visual basic routine run from an Access database
btw i need to copy-paste because in the current version of this 'software' we use excel macros to generate a lot of big tables with in-depth data, we paste those tables to a word document with a lot of text and explanations
basically to make offers in the fastes way possible and with less human-type errors!
next step will be to pritn a pdf file from excel, skipping word, but there is still a lot of work to do to reach that point!
- Tommaso_BertocchiSep 22, 2022Copper ContributorNo, definitly not possible, those excel file are too complicated and have too many data regarding our products/components/machines, it's not only picture / description as it may seem
- Sep 22, 2022If macros in Excel were used "to generate a lot of big tables with in-depth data", I have little doubt that it wouild not be possible to use a macro in Word to create the same thing in Word as you are trying to do by copying and pasting from Excel.
- Tommaso_BertocchiSep 22, 2022Copper Contributori have 1 excel file where i connect usually 5 other excel file (up to a max of 35)
each file have a huge list of components and stuff, with obviously a huge amount of formula
i cant see how i could do the same from word... how can i even tell to word wich files he have to open to make calculations and extract data?
im confused..