Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is it possible to make a word-report from excel, where the data is divided
in groups based on different criterias? An example, where towns starting on S i chosen first, then towns on O next: Wordtext text text .... Stockholm, Sweden Sevilla, Spain Sandefjord, Norway More text, more text, more text .... Oslo, Norway Ohio, USA And so on... - or are there any other solution on presenting multiple-sorted data? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This code when run from Excel will copy your filtered data from Excel
and paste it into a specific Word Doc. Be careful where your cursor is in the doc as it will paste where the cursor is. Sub CopyFilteredDataToWord() Dim wdApp As Word.Application, wdDoc As Word.Document On Error Resume Next Set wdApp = GetObject(, "Word.Application") If Err.Number < 0 Then 'Word isn't already running Set wdApp = CreateObject("Word.Application") End If On Error GoTo 0 Set wdDoc = wdApp.Documents.Open("C:\Excel Forums \LinkedToWord.doc") 'change the location and Doc Name wdApp.Visible = True Sheet2.AutoFilter.Range.Copy 'change sheet name of filtered data wdApp.Selection.Paste Application.CutCopyMode = False End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Import data from Excel into Word document fomat | Excel Discussion (Misc queries) | |||
import long Word document | Excel Discussion (Misc queries) | |||
how do I import variable data into a word document | Excel Discussion (Misc queries) | |||
Import a word document | Excel Worksheet Functions | |||
how can I import excel data to word document | Excel Discussion (Misc queries) |