office web component spreadsheet hyperlink

L

lon

I put some data in web page using OWC/spreadsheet, there are some cells have
hyperlinks, I need the spreadsheet to open those links in current web page,
but they have been opened in a new window by default, any idea how to do this?

Thanks avdanced
 
A

Alvin Bruney [MVP]

You will need to handle the hyperlink event. Inside this event, cancel the
event and then manually call the follow method of the hyperlink object. Set
the first parameter to true because the default is false and ignore or pass
in null for the remaining 4 parameters since they are reserved for future
use.
 
L

lon

Thanks Alvin, I kind understand your idea, but I just can not find the
hyperlink event
in OWC/Spreadsheet, there are only one called SheetFollowHyperlink, and the
hyperlink has acted before this event, Am I missing something?

Thanks again for your help.

Alvin Bruney said:
You will need to handle the hyperlink event. Inside this event, cancel the
event and then manually call the follow method of the hyperlink object. Set
the first parameter to true because the default is false and ignore or pass
in null for the remaining 4 parameters since they are reserved for future
use.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
lon said:
I put some data in web page using OWC/spreadsheet, there are some cells
have
hyperlinks, I need the spreadsheet to open those links in current web
page,
but they have been opened in a new window by default, any idea how to do
this?

Thanks avdanced
 
A

Alvin Bruney [MVP]

no, you are not missing anything. i sent you on a wild goose chase. sorry.
the only event available is the sheetfollowhyperlink event. I'm out of ideas
at this point.

probably one more thing you could try is to trap the click event on the
spreadsheet and use the rangefrompoint method to find out if there is a link
underneath the cursor, then call follow method to fire in its own window BUT
the original click would still have fired and i don't think you can cancel
this one. i'm temnpted to say at this point that it can't be done

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
lon said:
Thanks Alvin, I kind understand your idea, but I just can not find the
hyperlink event
in OWC/Spreadsheet, there are only one called SheetFollowHyperlink, and
the
hyperlink has acted before this event, Am I missing something?

Thanks again for your help.

Alvin Bruney said:
You will need to handle the hyperlink event. Inside this event, cancel
the
event and then manually call the follow method of the hyperlink object.
Set
the first parameter to true because the default is false and ignore or
pass
in null for the remaining 4 parameters since they are reserved for future
use.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
lon said:
I put some data in web page using OWC/spreadsheet, there are some cells
have
hyperlinks, I need the spreadsheet to open those links in current web
page,
but they have been opened in a new window by default, any idea how to
do
this?

Thanks avdanced
 
L

lon

Thanks Alvin for helping me this, it makes me much clear, I guess I would try
the click event.

Alvin Bruney said:
no, you are not missing anything. i sent you on a wild goose chase. sorry.
the only event available is the sheetfollowhyperlink event. I'm out of ideas
at this point.

probably one more thing you could try is to trap the click event on the
spreadsheet and use the rangefrompoint method to find out if there is a link
underneath the cursor, then call follow method to fire in its own window BUT
the original click would still have fired and i don't think you can cancel
this one. i'm temnpted to say at this point that it can't be done

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
lon said:
Thanks Alvin, I kind understand your idea, but I just can not find the
hyperlink event
in OWC/Spreadsheet, there are only one called SheetFollowHyperlink, and
the
hyperlink has acted before this event, Am I missing something?

Thanks again for your help.

Alvin Bruney said:
You will need to handle the hyperlink event. Inside this event, cancel
the
event and then manually call the follow method of the hyperlink object.
Set
the first parameter to true because the default is false and ignore or
pass
in null for the remaining 4 parameters since they are reserved for future
use.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
I put some data in web page using OWC/spreadsheet, there are some cells
have
hyperlinks, I need the spreadsheet to open those links in current web
page,
but they have been opened in a new window by default, any idea how to
do
this?

Thanks avdanced
 

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