Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Question about Word export to excel?
I cannot find a newsgroup for Word, it this might be applicable to what is
covered in this newsgroup so I'm going to ask this anyways... Is there a way i can export the list of Bookmarks from a Word file ? thx Mr BT |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Question about Word export to excel?
In the VBA Editor, go to the Tools menu, choose References, and
select Microsoft Word. Then use code like the following: Dim WordApp As Word.Application Dim WordDoc As Word.Document Dim Rng As Excel.Range Dim BM As Word.Bookmark Set Rng = Range("A1") On Error Resume Next Set WordApp = GetObject(, "Word.Application") If WordApp Is Nothing Then Set WordApp = CreateObject("Word.Application") End If If WordApp Is Nothing Then MsgBox "Unable to access Word" Exit Sub End If Set WordDoc = WordApp.Documents.Open(Filename:="H:\Test.doc") '<<< CHANGE For Each BM In WordDoc.Bookmarks Rng.Value = BM.Name Set Rng = Rng(2, 1) Next BM -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Mr BT" wrote in message news:z0tug.190415$iF6.35041@pd7tw2no... I cannot find a newsgroup for Word, it this might be applicable to what is covered in this newsgroup so I'm going to ask this anyways... Is there a way i can export the list of Bookmarks from a Word file ? thx Mr BT |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste Table from Word in Excel - 2000 -vs- 2002 | Excel Discussion (Misc queries) | |||
Extract MS Excel Data embedded in MS Word | Excel Discussion (Misc queries) | |||
can i export my excel page into a word doc? | Excel Discussion (Misc queries) | |||
Excel 5 and Excel 2000 question. | Excel Discussion (Misc queries) | |||
How do I export an Excel graph into a word document? | Excel Discussion (Misc queries) |