LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Importing Word text into Excel

I need to import a number of text lines from Word file into Excel. Using what
I found from postings here on importing tables and the Word macro recorder I
have the following partial code:
FName = Application _
.GetOpenFilename("Word Files (*.doc), *.doc")
Set oWord = GetObject(FName)
With oWord.Find
.Text = "Seq."
.Replacement.Text = ""
....
End With 'oWord
Selection.Find.Execute
Selection.MoveRight Unit:=wdCharacter, Count:=66, Extend:=wdExtend
Selection.MoveDown Unit:=wdLine, Count:=100, Extend:=wdExtend
Selection.Copy
Cells("A1").Activate
ActiveSheet.Paste

However, Excel VBA doesn't know wdCharacter or wdLine. It doesn't know
wdForward if I try a Move function. The number of lines of text to import is
constant.

Any workarounds would be greatly appreciated!


 
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
IMPORTING WORD TO EXCEL gwbdirect Excel Programming 6 June 24th 08 06:26 PM
After importing MS Word text, all cells are filled with ##### Bob Excel Discussion (Misc queries) 1 June 10th 08 10:58 PM
Importing from excel to word Kenike Excel Discussion (Misc queries) 2 November 30th 07 08:10 PM
Importing text from a Word bookmark into a spreadsheet travis[_3_] Excel Programming 0 August 31st 06 04:50 PM
importing text from bookmark in Word to excel mayanklal[_3_] Excel Programming 0 June 13th 06 03:23 PM


All times are GMT +1. The time now is 10:55 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"