
How to open and read a word doc in a vba loop
In addition to Mark's tips, also note that if you set a reference in your VB
project to Word, you will get access to intellisense, so that if you type,
for instance, an object name followed by a dot - such as Documents. - a list
will pop up of all the supported methods and properties for the object; for
you to pick from (this even works with variable names for object variables,
as long as you declare your variables properly:
http://www.mvps.org/word/FAQs/MacrosVBA/DeclareVariables.htm); and if you
click on a keyword in your code and press F1, the Help topic on that keyword
will open; and you will also have access to all Word's objects, properties
and methods in the Object Browser. Also see:
http://www.mvps.org/word/FAQs/MacrosVBA/VBABasicsIn15Mins.htm
Regards
Dave
| OK, I don't know if this is blindingly simple, or I'm
| barking up the wrong tree.
|
| I'm a VB programmer who has never used VBA before. I want
| to write a short vba module to open a document, search
| for index some stuff based on where it is placed in the
| document (column position), and then save each page as a
| htm file.
|
| And I'm stuck on the first step. How do yo open a
| document in vba? I've tried the simple "open 'thisfile'
| for input as #1 stuff with a line input statement...but I
| keep getting read past end of file errors. Me thinks I'm
| going about this the wrong way. Can anyone offer any
| advice?
|
| Thx!
|