LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Hiding a hyperlink!

Hi Jake,
The approach you suggest seems to be the easiest route to take for what I
want to accomplish. The only hurdle I could face is from our network
administration team. If I can get them to set up a virtual directory like
you describe, things will be really easy for me.

Thanks for the idea.
-- Manohar



"Jake Marx" wrote in message
...
Hi Srinivas,

I think "image/tiff" is the correct content-type for TIFF images.

John is correct - IE won't natively display TIFF images without a plugin

or
forcing a download. However, maybe we can simplify things a bit. You

could
just serve up the images directly via a URL without using ASP. For

example,
you could set up a virtual directory under your website root named

"images",
which points to a certain location on the web server that contains the

TIFF
images. Then, your code could just hyperlink directly to the image URL
(http://myserver/images/test.tif). The first time the user hits the link,
he/she will have to uncheck the "always ask before opening this type of
file". Each time after that, however, the image should pop up in the

user's
default TIFF viewing application.

This doesn't add hide the image names, but it will hide the image

location,
and the user will not be able to modify the image on the server.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Srinivas Chundi wrote:
Jake,
Thanks a bunch for the code.
I followed the example you gave. It should have worked, except for
one thing I ignored to mention.
The image files I have are .tif files. (I did not realise this could
make a difference). When I ran the asp page, instead of displaying
the image in the browser,
it prompted me if to select open or save. In the place where the
image is supposed to be displayed, I see a lot of strange looking
text. My guess is I do not have the right Content type. I have tried
"application/tif" and "image/tif". Neither worked.

In our installation we have something called "Imaging for Windows
Preview" that is launched when we double click on a .tif file. Is
there any way to force the browser to launch this program and display
the image in it? Thanks for your help
--M



"Jake Marx" wrote in message
...
Hi Srinivas,

Here's some sample ASP code that should get you started:

<%@ Language=VBScript EnableSessionState=False%
<%Option Explicit%
<%
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.Expires=0

Dim objStream, sImgName

sImgName=Request.QueryString("imageName")

If Len(sImgName) Then
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open
objStream.LoadFromFile "C:\images\" & sImgName
Response.ContentType = "image/jpeg"
Response.BinaryWrite objStream.Read
objStream.Close
Set objStream = Nothing
Else
Response.Write "Invalid image name."
End If
%

This code assumes that your images are placed in C:\images\ (on the
web server's hard drive). Excel (or wherever you place your
hyperlinks) should link to
http://servername/folder/filename.as...ame=image1.jpg or
similar. Notice that the actual filename of the image (without the
path) is passed in via the imageName argument in the querystring.
You could do this differently - i.e., create a mapping of codes to
filenames, which would add a bit more complexity. But it shouldn't
be too difficult.

Unless the users have rights to view the source of the ASP document
(can only be done through the file system, and they shouldn't have
rights to files on the server anyway), they will never know where
the images came from.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Srinivas Chundi wrote:
Jake,
Since I could not get our operations to let me use a web server, my
original idea was to create a dll that could be installed on users
machines. This dll could have functions that can copy the images
from the server to a temporary location on the users' machine. But
later, I realized that the number of users could be fairly big. So
I am in the process of convincing them to use the web server, in
the manner you describe.

Can you please point me to an example or some helpful links.
Thanks for your help.
--M



"Jake Marx" wrote in message
...
Hi Srinivas,

I think the only way you're going to be able to "hide" the real
location of the images is by adding a second layer to the process.
For example, you could store the images in a database.
Alternatively, you could create an ASP document that streams the
binary output of the image when a user hits it. For example, you
could link to a URL like this:

http://myintranet/myimages/getimage.asp?imageid=20032

The ASP code would process the URL, grab the associated image from
the filesystem, and stream it back to Excel. This would hide the
original location of the image.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Srinivas Chundi wrote:
I have explored this. The user can select the cell containing the
hyperlink, copy it to the clipboard (Ctrl+C) and paste it in MS
word. From here he can right click on the link to edit or view it.
The protection is no longer available once the user goes out of
the Excel spreadsheet. Unless I am missing something.
-M

"Tom Ogilvy" wrote in message
...
If you lock the cell (default) in Format=Cells, protection tab
and also select hidden and then protect the worksheet under
Tools=Protection=Protect sheet with a password, doesn't that do
what you want.

This certainly isn't foolproof as password crackers are easy to
come by, but does provide some security.

Obviously, you need to specify a display value, not have it
default to the fully qualified path to the file.

--
Regards,
Tom Ogilvy



Srinivas Chundi wrote in message
...
Using VB6, I have created an excel spreadsheet. Some cells
contain a hyperlink to TIF image files on a specific server
within the LAN. When the user clicks on any one of these cells,
it launches a copy of Imaging software and displays the image
the hyperlink is pointing to.

Is it possible to let the users view the images, like they are
currently doing, without giving them direct read access to the
specific location where the image files are located? I need to
do this to ensure that the users do not view/access the images
by any means other than clicking on the hyperlink. Also, the
location of the images should be hidden from them and they
should not be able to edit or copy/paste the hyperlink to a
different software, such as word. In essance, the users should
not know where the images are actually located and they should
not be able to get to them by any other means, say using
windows explorer or word.

It is really important that I accomplish something as close to
this as possible.
Any help is greatly appreciated.
Thanks
-- M




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't make hyperlink function work for hyperlink to website Frank B Denman Excel Worksheet Functions 15 February 5th 07 11:01 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Moving rows with Hyperlink doesn't move hyperlink address Samad Excel Discussion (Misc queries) 15 June 22nd 06 12:03 PM
Hiding hyperlink addresses Brisbane Rob Excel Discussion (Misc queries) 0 January 12th 06 07:42 PM
Intra-workbook hyperlink: macro/function to return to hyperlink ce marika1981 Excel Discussion (Misc queries) 3 May 6th 05 05:47 AM


All times are GMT +1. The time now is 11:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"