Copy image from existing workbook / template

G

Guest

We've just discovered a bug depending on whether Macro A or Macro has been
run on a workbook.

Macro A inserts an image from an original jpg on a network drive

Macro B inserts an image from an exisiting "template" in the workbook.

Whilst both images are the same (the image pasted in the template came from
the original jpg) the first Macro causes us problems when run a third macro
which reformats the workbook. If the source of the images on the workbook is
Macro A they get duplicated.

We want to rewrite the Macro to insert the images from a network copy of the
excel template - ideally without opening it.

Any suggestions?
 
G

Guest

I don't think you can grab an image from a closed workbook using existing VBA
properties and methods. Perhaps if you wrote code that can read the raw
compound document format and perhaps the BIFF format and extract and
interpret the sequence of bytes in the document that make up the image, you
could do that, but that would require many many lines of code and thorough
understanding of how the information is stored and how the data for an image
should be interpreted.
 
G

Guest

In that case, is there any way I can "hide" the fact that I am opening up the
template in order to copy the image on it?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top