OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Linking from a sheet to a scanned image?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Sun Feb 10, 2008 5:26 am    Post subject: Linking from a sheet to a scanned image? Reply with quote

Hi

Is it possible to have a button that links to a scanned image on the hard drive, for example a value for payment from an invoice would have a button or link that brought up the scanned image of the invoice etc?

Thanks for any help.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sun Feb 10, 2008 9:44 am    Post subject: Reply with quote

=HYPERLINK(A1;B1) shows a hyperlink with text from B1 and a file-url from A1. You may format the cell to look like a hyperlink or button. When I click the hyperlink a picture viewer with the linked picture pops up. This seems to be pre-configured by my Linux distribution.
URL in A1: file:///home/andreas/Documents/Bilder/bdm.jpg
Text in B1 to be displayed with the hyperlink: Landscape
Back to top
View user's profile Send private message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Tue Feb 12, 2008 1:08 pm    Post subject: Reply with quote

Thanks very much Villeroy this is what I was looking for.

Smile
Back to top
View user's profile Send private message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Fri Feb 15, 2008 4:13 pm    Post subject: Reply with quote

Hi

I am struggling with the file URL box. I can't get it to find the scanned pdf files.

Would it be possible to tell me exactly what to type into a cell to refer to a file if the directory structure was like these two examples......


1.
Calc workbook contained in folder.....

C:\Users\Company\Desktop\Job\

Scanned pdf documents in....

C:\Users\Company\Desktop\Job\Scanned Documents

2.
Calc workbook contained in same folder as scanned documents.

Thanks again for any help.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Feb 16, 2008 1:13 am    Post subject: Reply with quote

=MID(CELL("filename");2;SEARCH("/[^/]+'#";CELL("filename"))-1)
returns this document's path.


Last edited by Villeroy on Sat Feb 16, 2008 3:08 am; edited 1 time in total
Back to top
View user's profile Send private message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Sat Feb 16, 2008 2:28 am    Post subject: Reply with quote

Thanks again for taking the time Villeroy, I really do appreciate it.

I don't really want to search for filenames though, it is just a simple manual entry into a workbook for every document that I get in.

I have success with entering the filename like this.....

file:///C:/TenderDocument.pdf

.... which finds the document if I put it in the root directory. Is it possible to make the file reference relative though, because I want to be able to back up whole job folders regularly and still have the links work?

Cheers, Smile
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Feb 16, 2008 3:08 am    Post subject: Reply with quote

Create a named reference for ease of use:
Insert>Names>Define...(Ctrl+F3)
Name: Path
Refers To:=MID(CELL("filename");2;SEARCH("/[^/]+'#";CELL("filename"))-1)
[Add], [OK]
Let column A be a list of file names "xxx.pdf" and column B a list of optional descriptions.
Create a hyperlink from this document's path and the file name in A1. Use the label given in B1 or A1 if no label in B1:
=HYPERLINK(Path&A1;IF(B1<>"";B1;A1))


Last edited by Villeroy on Sat Feb 16, 2008 8:18 am; edited 1 time in total
Back to top
View user's profile Send private message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Sat Feb 16, 2008 7:33 am    Post subject: Reply with quote

Yes, that is it!! Smile

Thanks very much for the walkthrough Villeroy, the only thing I cannot do now is get the link to look like a button.

The format character isn't highlighted when the hyperlink cell is selected and the button menu has the control button greyed out. I can't get this either from the manual, do you know what I am missing out?

Danke.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Feb 16, 2008 7:43 am    Post subject: Reply with quote

I have a cell style "hyperlink" with blue, underlined font and another style "button" which makes a cell look like a button (grey background with shadow, bold, centered text).
Back to top
View user's profile Send private message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Sat Feb 16, 2008 7:59 am    Post subject: Reply with quote

I see, so it's not a button graphic, but the format of the cell.

Haben Sie vielen Dank!


Smile
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Sat Feb 16, 2008 8:06 am    Post subject: Reply with quote

Gern geschehen!
Back to top
View user's profile Send private message
brusejames
Newbie
Newbie


Joined: 28 Feb 2008
Posts: 1

PostPosted: Thu Feb 28, 2008 5:19 am    Post subject: Reply with quote

I have a problem of using hyperlink and relative path to open local file, such as pdf, jpg etc.
Thank Villeroy, but there is a tip to take care, as the red words says.

SEARCH
Returns the position of a text segment within a character string. You can set the start of the search as an option. The search text can be a number or any sequence of characters. The search is not case-sensitive.
The search supports regular expressions. You can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must precede every character with a \ character. You can switch the automatic evaluation of regular expression on and off in Tools - Options - OpenOffice.org Calc - Calculate.

Villeroy wrote:
Create a named reference for ease of use:
Insert>Names>Define...(Ctrl+F3)
Name: Path
Refers To:=MID(CELL("filename");2;SEARCH("/[^/]+'#";CELL("filename"))-1)
[Add], [OK]
Let column A be a list of file names "xxx.pdf" and column B a list of optional descriptions.
Create a hyperlink from this document's path and the file name in A1. Use the label given in B1 or A1 if no label in B1:
=HYPERLINK(Path&A1;IF(B1<>"";B1;A1))


Last edited by brusejames on Thu Feb 28, 2008 5:36 am; edited 1 time in total
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Thu Feb 28, 2008 5:26 am    Post subject: Reply with quote

It is a per-document setting, which is turned on by default. When you load an Excel document it is turned off for obvious reasons.
Back to top
View user's profile Send private message
captain caveman
General User
General User


Joined: 20 Nov 2007
Posts: 12

PostPosted: Mon Nov 17, 2008 1:40 am    Post subject: Reply with quote

Hi Villeroy et al, sorry for dragging this one up again, but I'm having a bit of trouble linking to another sheet using the Path name formula.

MID(CELL("filename");2;SEARCH("/[^/]+'#";CELL("filename"))-1)

It works really well when I am linking to scanned images, but I am trying to insert values from another sheet in the same working directory Calc gives an absolute reference to the hard drive, but when I try to replace the C:/Company/Company Accounts/ with Path it doesn't let me.

What is the correct syntax for this so I can have numbers from other sheets using the Path name so that it doesn't break when I move the files?

Thanks for any help.
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10106
Location: Germany

PostPosted: Mon Nov 17, 2008 1:47 am    Post subject: Reply with quote

See this thread with it's attached file
_________________
Rest in peace, oooforum.org
Get help on https://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group