Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
wmax77
 
Posts: n/a
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking table in Excel to word travis Links and Linking in Excel 1 November 19th 05 02:30 PM
excel 4.0 macro removal tool Sachin Shah Excel Discussion (Misc queries) 0 August 25th 05 04:17 AM
excel 4.0 macro remover tool Sachin Shah Excel Discussion (Misc queries) 0 August 25th 05 04:14 AM
Open Word Doc From Excel Macro MATT Excel Discussion (Misc queries) 4 December 14th 04 12:09 AM
copy addresses from word to excel msventura Excel Worksheet Functions 2 December 9th 04 10:44 PM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"