I'm trying to copy some cells from a excel sheet to a word document, by using the Command Button in word.
The problem I'm facing is that with my code, I can only copy one cell from excel into word.
Now to my question, how do I add multiple/different cells (columns and rows) into the word document?
First I created a excel document named autoWordfile and then I created a word document with an Command Button (ActiveX
As Reference for the project I chose the Microsoft Excel 14 Object Library.
This is how my code look like:
Dim objExcel As New Excel.Application
Dim wb As Excel.Workbook
Set wb = objExcel.Workbooks.Open("C:UsersAAAWasteautoWordfile")
Selection.TypeText wb.Sheets("Sheet1").Cells(1, 1)
Set wb = Nothing
If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines
Now my second idea which is what I want to achieve.
I'm going to create a questionnaire document in excel that automatically transfer relevant information from excel to word. In
other words, transfer the value adding information from the more informative excel document. I would desire to transfer
information from question 1 in excel to it's relating Q1"answering box" in word.
Does anyone have any idea how to perform this?