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
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.>>