Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. -- Regards, Tom Ogilvy "Dan Kelly" wrote: 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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? "Tom Ogilvy" wrote: 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. -- Regards, Tom Ogilvy "Dan Kelly" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to copy an image (or picture) from one workbook to a new sheetin another workbook | Excel Worksheet Functions | |||
How do I apply a template to one worksheet in existing workbook? | Excel Discussion (Misc queries) | |||
Need to insert a template with formulas into an existing workbook | Excel Worksheet Functions | |||
Copy Sheet from One workbook to another EXISTING workbook | Excel Programming | |||
Can you apply a template to an existing Workbook? | Excel Programming |