Microsoft Office Forums Pick up data from Word documenta

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-02-2008, 01:48 AM
jmarin jmarin is offline
Novice
Pick up data from Word documenta
 
Join Date: Nov 2008
Posts: 3
jmarin is on a distinguished road
Default Pick up data from Word documenta

How can I pick up data from Word document in Excel? I marked data with bookmarks and I need code for picking up data from bookmarks?



Thanks in advance
Reply With Quote
  #2  
Old 12-05-2008, 02:31 AM
HOmT398 HOmT398 is offline
Novice
 
Join Date: Dec 2008
Posts: 1
HOmT398 is on a distinguished road
Default

Hi,jmarin

here is a sample, hope can help you.
Code:
Sub test()
    Dim wrdApp As Object
    Dim myDoc As Object

    Set wrdApp = CreateObject("Word.Application")
   
    With wrdApp
        .Visible = False
        Set myDoc = .Documents.Open("e:\test.doc")
        myDoc.Bookmarks("Region").Range.Copy
        Sheet1.Range("A1").PasteSpecial xlPasteValues
        Application.CutCopyMode = False
    End With
   
    myDoc.Close True
    wrdApp.Quit
    Set myDoc = Nothing
    Set wrdApp = Nothing
End Sub
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pick up data from Word documenta Graphing in Excel - one plot many columns/pick one column jerryjaysr Excel 4 06-29-2006 07:27 AM


All times are GMT -7. The time now is 11:42 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft