Can't copy image format from template
I'm trying to copy image format from an image in a template to an image in a document. The document is based on that template.
When I run the code as shown in the attachment I get error:
---------------------------
Run-time error '4248':
This command is not available because no document is open.
---------------------------
The error is prompted at the first reference to ActiveDocument
If I step through the code it works (!?) It is enough to set a breakpoint at the first reference to ActiveDocument and it works fine.
But when I run full speed I get the error.
(I have tried to replaced the breakpoint with a 10s delay without luck)
|