Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default copying from word and pasting into excel


Hello

I hope this macro helps you


Sub importValuesFromWordTables()
'test with Excel2002
'Activate Microsoft Word xx.x Object Library
'
Dim WordApp As Word.Application
Dim WordDoc As Word.Document

Set WordApp = CreateObject("word.application") 'open Word session
WordApp.Visible = False 'Word not visisble during operation
Set WordDoc = WordApp.Documents.Open("C:\myDoc.doc") 'open Word doc

'copy third row of the first Word table
WordDoc.Tables(1).Rows(3).Range.Copy

'paste in Excel
Range("A1").PasteSpecial xlPasteValues

WordDoc.Close 'close Word doc
WordApp.Quit 'close Word session
End Sub


regards ,
michel


--
michelxld
------------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...o&userid=17367
View this thread: http://www.excelforum.com/showthread...hreadid=398449

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
Copying a doc from Excel and pasting it into Word. KC New Users to Excel 2 March 14th 09 08:39 PM
Copying Color-Coded Text and Pasting it in that format to Word Hope 2002 Excel Discussion (Misc queries) 5 July 29th 08 10:48 AM
copying/pasting accurately from a Word table (carriage returns) Guest3731 Excel Discussion (Misc queries) 1 May 6th 08 11:44 PM
Copying from Excel - pasting in Publisher Vman Excel Discussion (Misc queries) 0 March 20th 06 02:45 AM
Excel - Word: Problems copying/pasting shapes Nick Hebb Excel Programming 1 June 17th 05 09:55 PM


All times are GMT +1. The time now is 09:42 PM.

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"