Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Does anyone know how to get cell data (from multiple) cells into a Word
Document (New or a Template) by the click of a form button?? |
#2
![]() |
|||
|
|||
![]()
Adam,
The following Excel macro will copy all data from selected cells into a new Word document Sub moveToWord() Set x = CreateObject("Word.Application") x.Documents.Add x.Visible = True For Each cl In Selection x.Selection.TypeText CStr(cl.Value) x.Selection.TypeParagraph Next End Sub http://HelpExcel.com "Adam" wrote: Does anyone know how to get cell data (from multiple) cells into a Word Document (New or a Template) by the click of a form button?? |
#3
![]() |
|||
|
|||
![]()
So I just put this into the VBA code for a command button, correct?
"galimi" wrote: Adam, The following Excel macro will copy all data from selected cells into a new Word document Sub moveToWord() Set x = CreateObject("Word.Application") x.Documents.Add x.Visible = True For Each cl In Selection x.Selection.TypeText CStr(cl.Value) x.Selection.TypeParagraph Next End Sub http://HelpExcel.com "Adam" wrote: Does anyone know how to get cell data (from multiple) cells into a Word Document (New or a Template) by the click of a form button?? |
#4
![]() |
|||
|
|||
![]()
Forgot to mention that. You can tie this code to a form command button, or
use the code in between Sub and End Sub directly into a Command Button from the Control Toolbox or a UserForm. http://HelpExcel.com "Adam" wrote: So I just put this into the VBA code for a command button, correct? "galimi" wrote: Adam, The following Excel macro will copy all data from selected cells into a new Word document Sub moveToWord() Set x = CreateObject("Word.Application") x.Documents.Add x.Visible = True For Each cl In Selection x.Selection.TypeText CStr(cl.Value) x.Selection.TypeParagraph Next End Sub http://HelpExcel.com "Adam" wrote: Does anyone know how to get cell data (from multiple) cells into a Word Document (New or a Template) by the click of a form button?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? | Excel Discussion (Misc queries) | |||
How do I isolate my Excel server (automation) from other Excel instances? | Excel Discussion (Misc queries) | |||
Refreshing Access data in Excel | Excel Discussion (Misc queries) | |||
Word field codes in Excel data file Includetext | Excel Discussion (Misc queries) | |||
Getting specific data from a word document into an excel sheet | Excel Worksheet Functions |