
Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> I'm automating a mail merge and the document has several fill-in fields.
> Some users report that the fill-in box is behind other windows and cannot
[quoted text clipped - 3 lines]
> Any ideas on how to solve this problem? The version of Word is XP SP2 on
> Windows XP.
Give me an example of what you are talking about. I am automating Word from
VB6. I am executing the mailmerge this way:
1464 With oWrd.ActiveDocument.MailMerge
1466 .Destination = wdSendToNewDocument
1468 .SuppressBlankLines = True
1470 With .DataSource
1472 .FirstRecord = wdDefaultFirstRecord
1474 .LastRecord = wdDefaultLastRecord
1476 End With
1478 .Execute Pause:=True
With the Pause parameter set to True, Word comes to the foreground with the
focus on the Fill-in. On some computers it does not.

Signature
Stephen
Summit Program Manager
> Have you tried Activating the application and the document window in your
> automation code? (If you don't you may also be seeing other problems such as
[quoted text clipped - 7 lines]
> > Any ideas on how to solve this problem? The version of Word is XP SP2 on
> > Windows XP.
Peter Jamieson - 30 Jan 2008 22:06 GMT
Try, some of the following e.g.
oWrd.Visible = True
oWrd.Activate
oWrd.ActiveDocument.Activate
With oWrd.ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
oWrd.Activate

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> Give me an example of what you are talking about. I am automating Word
> from
[quoted text clipped - 28 lines]
>> > on
>> > Windows XP.
sfab - 30 Jan 2008 22:49 GMT
Thanks for the sample! I'm getting closer since now I can Alt-Tab to switch
to word. The fill-in is still behind the main application. Since this
problem doesn't happen everywhere, I'm wondering if there is some application
on the computer causing conflicts with pulling Word to the foreground, such
as a pop-up fax program.
Any Ideas?

Signature
Stephen
Summit Program Manager
> Try, some of the following e.g.
>
[quoted text clipped - 43 lines]
> >> > on
> >> > Windows XP.
Peter Jamieson - 31 Jan 2008 00:10 GMT
> Any Ideas?
Not at the moment, sorry...

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> Thanks for the sample! I'm getting closer since now I can Alt-Tab to
> switch
[quoted text clipped - 57 lines]
>> >> > on
>> >> > Windows XP.