Fill-in box behind other windows

S

sfab

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 be
seen. Not all users have this problem.

Any ideas on how to solve this problem? The version of Word is XP SP2 on
Windows XP.
 
P

Peter Jamieson

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
missing toolbars etc.)
 
S

sfab

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.

--
Stephen
Summit Program Manager


Peter Jamieson said:
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
missing toolbars etc.)
 
P

Peter Jamieson

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


--
Peter Jamieson
http://tips.pjmsn.me.uk

sfab said:
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.
 
S

sfab

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?
 

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