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
"vera" <sestyd@yahoo.com> wrote in message
news:044801c3d4b3$bd324a50$a601280a@phx.gbl...
> Please help me out! I'm new to Word VBA. I'm trying to
> write a Word Document from a VB6 program. I'm struggling
> through formatting the thing. How do I add a header? I
> think I might need to add a section first, but I'm having
> trouble locating any add header or add footer methods.
Can
> someone point me in the right direction?
>

Re: Writing Word Documents from VB6 Program by Perry

Perry
Wed Jan 07 11:27:48 CST 2004

> 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

"sestyd@yahoo.com" <anonymous@discussions.microsoft.com> wrote in message
news:072801c3d53d$ab91b440$a001280a@phx.gbl...
> 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
> "vera" <sestyd@yahoo.com> wrote in message
> news:044801c3d4b3$bd324a50$a601280a@phx.gbl...
> > Please help me out! I'm new to Word VBA. I'm trying to
> > write a Word Document from a VB6 program. I'm struggling
> > through formatting the thing. How do I add a header? I
> > think I might need to add a section first, but I'm having
> > trouble locating any add header or add footer methods.
> Can
> > someone point me in the right direction?
> >
>
>
>
>
>



Re: Writing Word Documents from VB6 Program by anonymous

anonymous
Wed Jan 07 11:51:10 CST 2004

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

>-----Original Message-----
>> 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
>
>"sestyd@yahoo.com" <anonymous@discussions.microsoft.com>
wrote in message
>news:072801c3d53d$ab91b440$a001280a@phx.gbl...
>> 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
>> "vera" <sestyd@yahoo.com> wrote in message
>> news:044801c3d4b3$bd324a50$a601280a@phx.gbl...
>> > Please help me out! I'm new to Word VBA. I'm trying to
>> > write a Word Document from a VB6 program. I'm
struggling
>> > through formatting the thing. How do I add a header? I
>> > think I might need to add a section first, but I'm
having
>> > trouble locating any add header or add footer methods.
>> Can
>> > someone point me in the right direction?
>> >
>>
>>
>>
>>
>>
>
>
>.
>

Re: Writing Word Documents from VB6 Program by Perry

Perry
Wed Jan 07 11:58:24 CST 2004

> 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

<anonymous@discussions.microsoft.com> wrote in message
news:009001c3d546$d58cb020$a401280a@phx.gbl...
> 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
>
> >-----Original Message-----
> >> 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
> >
> >"sestyd@yahoo.com" <anonymous@discussions.microsoft.com>
> wrote in message
> >news:072801c3d53d$ab91b440$a001280a@phx.gbl...
> >> 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
> >> "vera" <sestyd@yahoo.com> wrote in message
> >> news:044801c3d4b3$bd324a50$a601280a@phx.gbl...
> >> > Please help me out! I'm new to Word VBA. I'm trying to
> >> > write a Word Document from a VB6 program. I'm
> struggling
> >> > through formatting the thing. How do I add a header? I
> >> > think I might need to add a section first, but I'm
> having
> >> > trouble locating any add header or add footer methods.
> >> Can
> >> > someone point me in the right direction?
> >> >
> >>
> >>
> >>
> >>
> >>
> >
> >
> >.
> >



Re: Writing Word Documents from VB6 Program by Cindy

Cindy
Wed Jan 07 12:58:09 CST 2004

Hi Sestyd@yahoo.com,

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 :-)


Re: Writing Word Documents from VB6 Program by anonymous

anonymous
Wed Jan 07 13:20:32 CST 2004

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

>-----Original Message-----
>Hi Sestyd@yahoo.com,
>
>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 :-)
>
>.
>

Re: Writing Word Documents from VB6 Program by Cindy

Cindy
Thu Jan 08 04:49:34 CST 2004

> 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 :-)