capture EXCEL date and insert in WORD--send Excel data into Word Doc

csekhar.apps

New Member
Joined
Apr 19, 2010
Messages
5
Hi Gurus,

Hope you guys had a great weekend.I have situation where I have capture the 'Cell Value' from EXCEL and I have to reflect that value in Word (no copy paste) once you click 'pushbutton' in excel worksheet it should reflect the value in WORD.Hope someone can show me the light!

Im trying to insert a cell value into a sentence of word, for example i want In WORD it would like invoice it will have values like Client name,address,due date total amount or values:-

Account Name: Bill Gates.

Address: CA, USA

Due Date: 19-04-2010

Total: $1,00,000


Any ideas please?
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

csekhar.apps

New Member
Joined
Apr 19, 2010
Messages
5
Thanks a billion Brian, It was really helpful information and for your time. It really helped me a lot, I need some more help

I have a word document which I would like to automatically populate data from Excel into. The word document is like TEMPLATE and I would rather the data from excel didn't just appear in a line but rather in the various places on the page it should go.

For instance

------A---------B----------C--------D-----------E----------F

1----Fred------Blue------<wbr>12345-----Left-------£55.55---<wbr>--abcde
2----John------Red------54321-<wbr>----Right------£99.99-----<wbr>edcba


So far I have I can take Excel values to Word

Sub PasteToWord()

Dim AppWord As Word.Application

Set AppWord = CreateObject("Word.Application")
AppWord.Visible = True
' Change the range to suit your needs. See the How to Use for this code
Sheets("Sheet1").Range("A1:C10").Copy
AppWord.Documents.Add
AppWord.Selection.Paste

Application.CutCopyMode = False

Set AppWord = Nothing

End Sub

Sub CellsExample()
For i = 1 To 25
For j = 1 To 10
Cells(i, j) = "Rows " & i & " Cols " & j
Next j
Next i
End Sub
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
Before continuing with code it is a good idea to check your overall method.

Try this ..
1. Select your range in Excel & copy
2a. Go to your Word documents and Paste.

2b.Alternatively, in Word you can use Edit/Paste Special ... link, the data in Word will change automatically to match Excel. No need for code perhaps.


If using code we need to know where in Word we are adding data.
A simple method is to have something unique in the document so we can use "Find" & Replace. eg. "[ NEW DATA HERE ]"
 

csekhar.apps

New Member
Joined
Apr 19, 2010
Messages
5


Thanks Brian, actually if it's copy & paste I would have done it,but my requirement is to take values from excel to word and place the values in word in desired place for eg: Invoice calculation part is done in Excel and passing Invoice values to word..hope you understand where I am coming..Thanks in advance. I have tried to attach screen shot along with this reply. hope it attaches as I am not can we attach ..Cheers
 

Watch MrExcel Video

Forum statistics

Threads
1,108,719
Messages
5,524,460
Members
409,582
Latest member
riibuildersinc

This Week's Hot Topics

Top