+ Reply to Thread
Results 1 to 2 of 2

Embedding Images in Excel Workbook

  1. #1
    danmyhre@gmail.com
    Guest

    Embedding Images in Excel Workbook

    Hello,

    I am dynamically creating excel workbooks by generating a htm file
    inside of a VB app, then opening the htm file in excel, and then saving
    the workbook in standard excel format (xls). The only problem I have
    is that my images are saved as "Linked" instead of "Embedded" images.

    Example HTM:
    ....
    <td>
    <img src="file:///\\myserver\share\image.jpg">
    </td>
    ....

    Since the image is linked, if the image file on the server where to be
    moved or deleted, all of the workbooks that reference that image would
    just contain a place holder.

    Is there a way to go through all of the shape objects (images) in excel
    and switch it from being a linked to embedded image so that it gets
    saved inside of the xls file??

    Thanks

    Dan


  2. #2
    Lee Hunter
    Guest

    RE: Embedding Images in Excel Workbook

    Hi Dan,

    try " =EMBED("Worksheet","") "ActiveSheet.OLEObjects.Add(Filename:= _
    "YourFIleName" , Link:=False, DisplayAsIcon:=False).Select


    Lee Hunter

    "danmyhre@gmail.com" wrote:

    > Hello,
    >
    > I am dynamically creating excel workbooks by generating a htm file
    > inside of a VB app, then opening the htm file in excel, and then saving
    > the workbook in standard excel format (xls). The only problem I have
    > is that my images are saved as "Linked" instead of "Embedded" images.
    >
    > Example HTM:
    > ....
    > <td>
    > <img src="file:///\\myserver\share\image.jpg">
    > </td>
    > ....
    >
    > Since the image is linked, if the image file on the server where to be
    > moved or deleted, all of the workbooks that reference that image would
    > just contain a place holder.
    >
    > Is there a way to go through all of the shape objects (images) in excel
    > and switch it from being a linked to embedded image so that it gets
    > saved inside of the xls file??
    >
    > Thanks
    >
    > Dan
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1