View Single Post
 
Old 03-05-2015, 05:31 AM
mrkozmic mrkozmic is offline Windows 8 Office 2013
Novice
 
Join Date: Mar 2015
Posts: 6
mrkozmic is on a distinguished road
Default 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)
Attached Images
File Type: png Untitled.png (17.0 KB, 13 views)
Reply With Quote