Hi All
I have some easy code in Access 2010 SP1 for opening Word 2010 and do a mailmerge. On four local and different installations that works fine.
But on a Citrix installation I get strange error messages.
It seems to be a timing problem.
Please have a look at the short VBA example:

The code is run with a button on a form.
If I run it at once I usually get an error in line 9:
"4248, The command is not available, because no document has been opened"
But if I debug the code with F8 it works fine.
I guessed it could be a timing problem.
After an insertion of a delay of 200ms after line 8, it seems to work.
But now I get another problem:
Word opens although there is NO "objWord.Visible = True" in the code!
Every time I solved a problem, another appears...
That's strange.
Does anybody have some experience with such things?
I've been using Word automation from Access for so many years but now it makes me mad...
Thanks a lot and hope someone has an idea!
Best wishes
Daniel
I have some easy code in Access 2010 SP1 for opening Word 2010 and do a mailmerge. On four local and different installations that works fine.
But on a Citrix installation I get strange error messages.
It seems to be a timing problem.
Please have a look at the short VBA example:

The code is run with a button on a form.
If I run it at once I usually get an error in line 9:
"4248, The command is not available, because no document has been opened"
But if I debug the code with F8 it works fine.
I guessed it could be a timing problem.
After an insertion of a delay of 200ms after line 8, it seems to work.
But now I get another problem:
Word opens although there is NO "objWord.Visible = True" in the code!
Every time I solved a problem, another appears...
That's strange.
Does anybody have some experience with such things?
I've been using Word automation from Access for so many years but now it makes me mad...
Thanks a lot and hope someone has an idea!
Best wishes
Daniel