S
Sean
Hi, I'm adding a background to a Word 2002 doc using the following VB code:
Set lobjPicture =
mWord2000.ActiveDocument.Sections.First.Headers(1).Shapes.AddPicture(mstrTem
plateDir & "\" & lsPictureFilename, False, True, 0, 0, 594, 835)
lobjPicture.LockAnchor = True
lobjPicture.WrapFormat.Type = WdWrapType.wdWrapNone
lobjPicture.Top = -17
lobjPicture.Left = -20
lobjPicture.ZOrder (msoSendBehindText)
When I run this it seems to work ok, however when I send it to the Goldfax
server the background doesn't appear on the fax. That's unless I put a
"DoEvents" and a 3 second delay right after these lines. If I do that then
the background appears on the fax.
Now that we're trying to do this on Citrix (Terminal Server) servers it only
works intermittently. We're going to try increasing the length of the pause,
but it's not a nice solution and could still fail if the server load is
high.
One strange thing is that when I open the docs in Word the ones that worked
have the background appear almost instantly, whereas with the ones that
didn't work there's a delay before the background appears. This must be the
root of the problem, when Goldfax renders the document into a fax it must do
it so quickly that the background hasn't had time to appear.
So basically if I don't pause after adding the background then Word takes a
while to display the background when the document is opened subsequently.
Does anyone have any idea why this is happening?
Many thanks.
Sean
Set lobjPicture =
mWord2000.ActiveDocument.Sections.First.Headers(1).Shapes.AddPicture(mstrTem
plateDir & "\" & lsPictureFilename, False, True, 0, 0, 594, 835)
lobjPicture.LockAnchor = True
lobjPicture.WrapFormat.Type = WdWrapType.wdWrapNone
lobjPicture.Top = -17
lobjPicture.Left = -20
lobjPicture.ZOrder (msoSendBehindText)
When I run this it seems to work ok, however when I send it to the Goldfax
server the background doesn't appear on the fax. That's unless I put a
"DoEvents" and a 3 second delay right after these lines. If I do that then
the background appears on the fax.
Now that we're trying to do this on Citrix (Terminal Server) servers it only
works intermittently. We're going to try increasing the length of the pause,
but it's not a nice solution and could still fail if the server load is
high.
One strange thing is that when I open the docs in Word the ones that worked
have the background appear almost instantly, whereas with the ones that
didn't work there's a delay before the background appears. This must be the
root of the problem, when Goldfax renders the document into a fax it must do
it so quickly that the background hasn't had time to appear.
So basically if I don't pause after adding the background then Word takes a
while to display the background when the document is opened subsequently.
Does anyone have any idea why this is happening?
Many thanks.
Sean