Writing Word Documents from VB6 Program

S

sestyd

Doug,

Thanks. I guess I shouldn't have changed the email
address -- well the form does say sender's email!

Can you point me to some good documentation in the MSDN
library? I'm looking for two things, the first like a
quick start for programming Word VBA.

Also, I'm trying to find a concise overview of the object
model and with each object, an explanation of the
properties and methods. For instance, the documentation of
the sections collection object doesn't list any of the
properties or methods, but there are ten properties on the
auto complete list box in VB. And the documentation for
the headers property says nothing about it's objects!

Vera



Hi Vera,

ActiveDocument.Sections(1).Headers
(wdHeaderFooterPrimary).Range.Text =
"Test"

will insert the word Test into the primary header of the
first section
of
the active document.

Please post any further questions or followup to the
newsgroups for the
benefit of others who may be interested. Unsolicited
questions
forwarded
directly to me will only be answered on a paid consulting
basis.
Hope this helps
Doug Robbins - Word MVP
 
P

Perry

Also, I'm trying to find a concise overview of the object
model and with each object, an explanation of the
properties and methods. For instance, the documentation of
the sections collection object doesn't list any of the
properties or methods, but there are ten properties on the
auto complete list box in VB. And the documentation for
the headers property says nothing about it's objects!

Here are a couple of URLs that'll get you going.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/htm
l/deovrmicrosoftword2000.asp
(note: 2 lines make up 1 URL)

www.mvps.org/word
and of course the entire MSDN online lib
http://msdn.microsoft.com/library/

Krgrds,
Perry
 
G

Guest

Perry,

Thanks for the URL's. Page 4 was the most helpful,
although I've been there before -- nothing clicks through
and the documentation in the library doesn't list the
methods and properties of each object. So when I read the
documentatio for the sections collection object, none of
the properties or methods were listed or even linked to in
the text. I'm really looking for something that's
organized like the JAVA API.

Vera
 
P

Perry

So when I read the
documentatio for the sections collection object, none of
the properties or methods were listed or even linked to in
the text.

Hmm, I've checked and yup ... indeed :(
Seems you have to 'trial and error' yr way through, hey?

I'd say, code on and if you get stuck, kindly repost
where things are obstructing you.
Maybe we will be of help then ...

Krgrds,
Perry
 
C

Cindy M -WordMVP-

Hi (e-mail address removed),

Have you tried starting Word, Alt+F11 to open the VB Editor
then reading up on the object model in Word's Help files? If
I go to the information on SECTIONS, for example, there is a
list of properties and one of methods that link to those
subjects. Plus, I think there's also a schematic overview
with links...
I'm trying to find a concise overview of the object
model and with each object, an explanation of the
properties and methods. For instance, the documentation of
the sections collection object doesn't list any of the
properties or methods, but there are ten properties on the
auto complete list box in VB. And the documentation for
the headers property says nothing about it's objects!

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 
G

Guest

Cindy,

Thanks. My help in the VBA editor isn't working. I'm not
sure if it's not installed or if it's just Word 97. I'll
have to check with IT but I'm sure they're upgrading me to
2000 soon. It's a little frustruating, for sure.

Vera
 
C

Cindy M -WordMVP-

My help in the VBA editor isn't working. I'm not
sure if it's not installed or if it's just Word 97. I'll
have to check with IT but I'm sure they're upgrading me to
2000 soon. It's a little frustruating, for sure.
Yes, that would be. How about locating the .chm files
(probably the same folder with winword.exe) and
double-clicking?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top