SOLVED

Help with Paste from excel to word

Copper Contributor

Hi everyone!
there is something going on that i really cant figure out..
i have an excell file with a table, few columns lot of rows, and a lot of pictures!
if i select the whole 'space/stable' copy and paste on WORD 2010 it works perfectly fine (i can give the file with the result) but if i paste into WORD 2016 it screw up everything..
i've cheked like aaaall the options in words, even comparing between the two version, but i really cant figure out whats the problem is!
can someone give any type of help?

12 Replies
If you upload a copy of the Excel Workbook and the Word documents, one of use may be able to determine the cause of the issue and provide a work-around.

@Doug_Robbins_Word_MVP 

Goodmorning! thanks for the reply, here are the links:
note: excel file have a macro to copy the area that needed to be pasted, feel free to keep macro disabled if you dont trust it and manually select the whole table( 3-612, D-J)
www.martel.it/File_uso_interno/Example.xlsm
www.martel.it/File_uso_interno/word2010-right.docx
www.martel.it/File_uso_interno/word2016-wrong.docx


p.s. i'm worried it could be a problem not related to excel/word, but with the clipboard of windows10  wich maybe is too slow?

 

thanks in advance!

When opened in a 64bit installation of Microsoft 365 Apps for enterprise, Version 2208 (Build 15601.20148 Click-to-Run) Curret Channel, both the Word2010-right and Word2016-wrong documents appear to be complete and identical with all of the images from teh Excel workbook.

However, if I try to copy and paste into a Word document in the above version of Office, very few of the images are present in the document.

I guess the question is, why do you need to move from Excel to Word?
first part of your reply is suuuper weird! i will do some testing

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!
It would be possible to create a macro in Word to create the table in Word in the first instance so that copying and pasting from Excel would not be required.
No, 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
If 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.
i 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..
Q. How can i even tell to word wich files he have to open to make calculations and extract data?
A. In the same way that you tell Excel which files have to be opened and which calculations have to be made to extract the data into the workbook that contains the table that you are now manually copying and pasting into Word.

I realise that you probably have quite an investment in the system that you have already developed and thus can understand the reluctance to develop an alternative. However, that does not mean that it cannot be done.
i take 5 more minutes, if you dont mind, to try to better ubnderstand the basics and then i will try to learn by myself

with excel i can easily define ranges/cells, and then choose where and how to insert data/text/pictures
you telling me i can do the same on word? lets say i have something like this..

here some text already written in word

here i want to build/insert a table with energy comsumption or whatever data

here some more text already written in the document

is it possible to actually make a macro that create the table in the right place??

if the answer is yes i will cry because i invested so many hours in excelt thinking it was not possible to do so.....
(another big question is.. how can word knows where to find the files? on excel is easy because i literally link (trough macro) the files, so the user doesnt have to manually write any filepath or whatever)
best response confirmed by Tommaso_Bertocchi (Copper Contributor)
Solution

@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

Doug_Robbins_Word_MVP_0-1663839419696.png

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

 

Doug_Robbins_Word_MVP_1-1663839869385.png

 

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

 

Doug_Robbins_Word_MVP_2-1663840089688.png

 

 

 

 

 

 

 

i will further investigate and learn, i really appreciate your help sir!

anyway we didnt discover why the hell it paste in a wrong way on word2016 but works fine on word2010! not a big deal, i will find a work-around
1 best response

Accepted Solutions
best response confirmed by Tommaso_Bertocchi (Copper Contributor)
Solution

@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

Doug_Robbins_Word_MVP_0-1663839419696.png

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

 

Doug_Robbins_Word_MVP_1-1663839869385.png

 

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

 

Doug_Robbins_Word_MVP_2-1663840089688.png

 

 

 

 

 

 

 

View solution in original post