I have some code in a VB6 app that opens a Word doc based on a template. It
looks like this:

Dim wordApp As Word.Application
Set wordApp = CreateObject("Word.Application")
wordApp.Documents.Add Template:=(strPathToTemplate), NewTemplate:=False
wordApp.Application.Visible=True

When I create a doc manually, everything works as expected. However, when I
open it from this code, the Word window opens with no toolbars visible.

Any ideas would be helpful.

RE: Creating word doc with FILLIN field hides all toolbars by Ed

Ed
Thu Jun 28 12:38:04 CDT 2007

Hi Barry,

We used to get that problem when automating Word from VB6 to perform a mail
merge.

The way I think you can get around it is to make Word visible before
creating the document.

(Not strictly relevant here but we also had a problem with at least one
version of Word - 2000 I think - where after Word was automated the toolbars
would be visible but not active. We got around this by activating the app -
e.g. wordApp.Activate.)

Regards.

Ed
"Barry Gilbert" wrote:

> I have some code in a VB6 app that opens a Word doc based on a template. It
> looks like this:
>
> Dim wordApp As Word.Application
> Set wordApp = CreateObject("Word.Application")
> wordApp.Documents.Add Template:=(strPathToTemplate), NewTemplate:=False
> wordApp.Application.Visible=True
>
> When I create a doc manually, everything works as expected. However, when I
> open it from this code, the Word window opens with no toolbars visible.
>
> Any ideas would be helpful.

RE: Creating word doc with FILLIN field hides all toolbars by BarryGilbert

BarryGilbert
Thu Jun 28 12:52:02 CDT 2007

Ed,

Thanks very much for your suggestion! Making the app visible first did the
trick.

Regards,
Barry

"Ed" wrote:

> Hi Barry,
>
> We used to get that problem when automating Word from VB6 to perform a mail
> merge.
>
> The way I think you can get around it is to make Word visible before
> creating the document.
>
> (Not strictly relevant here but we also had a problem with at least one
> version of Word - 2000 I think - where after Word was automated the toolbars
> would be visible but not active. We got around this by activating the app -
> e.g. wordApp.Activate.)
>
> Regards.
>
> Ed
> "Barry Gilbert" wrote:
>
> > I have some code in a VB6 app that opens a Word doc based on a template. It
> > looks like this:
> >
> > Dim wordApp As Word.Application
> > Set wordApp = CreateObject("Word.Application")
> > wordApp.Documents.Add Template:=(strPathToTemplate), NewTemplate:=False
> > wordApp.Application.Visible=True
> >
> > When I create a doc manually, everything works as expected. However, when I
> > open it from this code, the Word window opens with no toolbars visible.
> >
> > Any ideas would be helpful.

RE: Creating word doc with FILLIN field hides all toolbars by Ed

Ed
Thu Jun 28 12:56:00 CDT 2007

Hi Barry,

You're welcome.

Cheers.

Ed

"Barry Gilbert" wrote:

> Ed,
>
> Thanks very much for your suggestion! Making the app visible first did the
> trick.
>
> Regards,
> Barry
>
> "Ed" wrote:
>
> > Hi Barry,
> >
> > We used to get that problem when automating Word from VB6 to perform a mail
> > merge.
> >
> > The way I think you can get around it is to make Word visible before
> > creating the document.
> >
> > (Not strictly relevant here but we also had a problem with at least one
> > version of Word - 2000 I think - where after Word was automated the toolbars
> > would be visible but not active. We got around this by activating the app -
> > e.g. wordApp.Activate.)
> >
> > Regards.
> >
> > Ed
> > "Barry Gilbert" wrote:
> >
> > > I have some code in a VB6 app that opens a Word doc based on a template. It
> > > looks like this:
> > >
> > > Dim wordApp As Word.Application
> > > Set wordApp = CreateObject("Word.Application")
> > > wordApp.Documents.Add Template:=(strPathToTemplate), NewTemplate:=False
> > > wordApp.Application.Visible=True
> > >
> > > When I create a doc manually, everything works as expected. However, when I
> > > open it from this code, the Word window opens with no toolbars visible.
> > >
> > > Any ideas would be helpful.