+ Reply to Thread
Results 1 to 10 of 10

Image path

  1. #1
    Registered User
    Join Date
    04-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    31

    Image path

    I have an image in excel which i want to use as a hyperlink image. The link is sent to all users through mail. I can send hyperlinks but what I want is that the image to be the hyperlink , something like this :
    Please Login or Register  to view this content.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Image path

    if the image isn't stored somewhere everyone can access it I think you'll have to encode the file into base64 and embed that string into the source. you may need to save the file to disk before you can do that.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Image path

    Quote Originally Posted by JosephP View Post
    if the image isn't stored somewhere everyone can access it I think you'll have to encode the file into base64 and embed that string into the source. you may need to save the file to disk before you can do that.
    I just want to insert the image into the html tag mentioned above. I tried using names but i think html tags cant read that so i have to specify the path of that image..

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Image path

    the image does not have a path unless you extract it from the container file (if it's an openxml format file) and specifying a local path won't help since nobody else will be able to access it.

  5. #5
    Registered User
    Join Date
    04-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Image path

    Quote Originally Posted by JosephP View Post
    the image does not have a path unless you extract it from the container file (if it's an openxml format file) and specifying a local path won't help since nobody else will be able to access it.
    So is there any way i can specify the img src tag in html to take the image in excel. Actually I am sending the link of a file path to all users through outlook... and its automated. So for the body of the outlook i have that html coding.... Earlier i used to simply sent the hyperlink but now i want the image to be the hyperlink. Could it be done...

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Image path

    you can write the file to disk then encode it and embed that data using code like this
    Please Login or Register  to view this content.
    which you call with this
    Please Login or Register  to view this content.
    as an example.

  7. #7
    Registered User
    Join Date
    04-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Image path

    Quote Originally Posted by JosephP View Post
    you can write the file to disk then encode it and embed that data using code like this
    Please Login or Register  to view this content.
    which you call with this
    Please Login or Register  to view this content.
    as an example.
    Appreciate your time and effort...will let you know how it goes....

  8. #8
    Registered User
    Join Date
    04-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Image path

    Quote Originally Posted by me_king View Post
    Appreciate your time and effort...will let you know how it goes....
    Image but with an "x" i mean invalid image, the file gets saved and i have checked the path is also correct. Don't know for some reason its not showing the image.

  9. #9
    Registered User
    Join Date
    04-12-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Image path

    Quote Originally Posted by me_king View Post
    Image but with an "x" i mean invalid image, the file gets saved and i have checked the path is also correct. Don't know for some reason its not showing the image.
    Yes it worked but what I did is that I saved the image and then used the same path to refer to it, used piccode function and removed the other ones...

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Image path

    since I don't know what you were doing with the output I can't comment. I tested the code by pasting the output into an htm file and that loaded the image perfectly in IE.

+ 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