LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Open One Word File from Excel

Stratuser,

you can try this.

Sub copyexceltoword()

Set wd = CreateObject("word.application")
wd.Application.Visible = True
wd.Application.Documents.Open "c:\matt.doc" ' Open your word document
Application.Visible = True

For a = 1 To 5

Application.Range("a" & a).Copy 'copy data from excel
wd.Selection.Paste 'Paste data into word
Next a



Set wd = Nothing 'Clear the memory. Very important.


End Sub


let me know if you need further help.


---
Message posted from http://www.ExcelForum.com/

 
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
How to open Excel/Word/PP file in office 2003 by default? Kashif Excel Discussion (Misc queries) 2 December 15th 08 03:13 PM
Word and Excel crash when I try to open a folder to get to a file DGD41 Excel Discussion (Misc queries) 7 April 15th 06 09:14 PM
Trying to open Excel/Word files error message "Unable to read file RobM Excel Discussion (Misc queries) 1 February 7th 05 08:11 PM
open word file? pgoodale[_3_] Excel Programming 1 December 31st 03 01:15 PM
Graph Excel Selection, Open Word File, Embed Graph Into Word Steve Excel Programming 0 November 17th 03 05:35 PM


All times are GMT +1. The time now is 01:49 AM.

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

About Us

"It's about Microsoft Excel"