Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
copy from Excel to Word by macro with certain for
Hi, i need your help people this is the code: Sub ControlWord() Dim appWD As Word.Application Dim wddoc As Word.Document Set appWD = CreateObject("Word.Application") Set wddoc = appWD.Documents.Add FinalRow = Sheets("Data").Range("A9999").End(xlUp).Row For i = 2 To FinalRow Sheets("Data").Range("A" & i).Copy Destination:=Sheets("Template").Range("C4") Sheets("Data").Range("B" & i & ":E" & i).Copy Sheets("Template").Range("C10").PasteSpecial Transpose:=True Sheets("Template").Range("A1:F15").CopyPicture appWD.Selection.Paste Next i appWD.ActiveDocument.SaveAs Filename:="c:\File.doc" appWD.ActiveDocument.Close appWD.Quit End Sub i copy data from excel to word by certain format,the problem is that the data in excel devided to groups (from "Data--Group and Outline" in the menu). how can i change this code to copy the data with groups? And how can i copy the data without table but not as a Picture? -- wmax77 ------------------------------------------------------------------------ wmax77's Profile: http://www.excelforum.com/member.php...o&userid=31355 View this thread: http://www.excelforum.com/showthread...hreadid=511465 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Linking table in Excel to word | Links and Linking in Excel | |||
excel 4.0 macro removal tool | Excel Discussion (Misc queries) | |||
excel 4.0 macro remover tool | Excel Discussion (Misc queries) | |||
Open Word Doc From Excel Macro | Excel Discussion (Misc queries) | |||
copy addresses from word to excel | Excel Worksheet Functions |