Making the templated document the active document

I have a form which pulls various bits of data from a SQL Server database. Depending on the selections made the ok click adds a certain template (letter, fax etc). If I have no other documents open this is fine, but as soon as I have, once the template bookmarks have been populated, the focus returns to the previous active document.

I have tried mydocument.activate with no joy. I am fairly new to VBA, so I may well be missing something very obvious.

Any advices greatly received. Many thanks.

Ed

[525 byte] By [RocksteadyUK] at [2007-12-22]
# 1
Impossible to venture a guess without seeing the code and knowing the
version of Word involved.
<<I have a form which pulls various bits of data from a SQL Server
database. Depending on the selections made the ok click adds a certain
template (letter, fax etc). If I have no other documents open this is
fine, but as soon as I have, once the template bookmarks have been
populated, the focus returns to the previous active document.

I have tried mydocument.activate with no joy. I am fairly new to VBA, so
I may well be missing something very obvious.

Any advices greatly received. Many thanks.>>

CindyMeister at 2007-8-30 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...