Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-02-2008, 01:48 AM
Novice
 
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
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
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 07:41 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft