Acc 2010 and VBA: Strange problems under Citrix

chappy72

New member
Local time
Today, 05:31
Joined
Jan 18, 2012
Messages
3
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:
citrix.jpg
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
 
With Word, I have found you have to explicitly use

objWord.Visible = False

to keep it from showing (when using Citrix).

As for the timing issue, it could be as you say you have implemented a delay and it works.
 

Users who are viewing this thread

Back
Top Bottom