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 to a user-specific image

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Melange
Newbie
Newbie


Joined: 10 Feb 2008
Posts: 4

PostPosted: Sat Feb 16, 2008 4:33 am    Post subject: Linking to a user-specific image Reply with quote

I'm writing a template where I'm using fields to insert the author's name, telephone number, email address etc. automatically, works all very nice. In that template, I would also like to link to an image using some sort of absolute path name which points to an image specific to the author and stored on his/her local computer (think of a scanned signature image file, it's as user-specific like his name).

The bests way I could find so far is to define a common absolute file name, for example C:/image.png, ask everyone to copy his/her image there and to disable the OOo option which forces relative file names in order to have that file name absolute. This solution works but is not satisfying, because we usually prefer relative file names, amongst other reasons.

What's the best way to implement this? Nice would be to have a local, user-specific field like "First name", "Telephone number" etc. called "Signature" in the user options, and then the possibility to use that field value as a file name in the image URL. Is there a way to use fields in image URLs? How about environment variables (that would also work)?

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


Joined: 19 Jan 2006
Posts: 2771
Location: Minneapolis, Minnesota

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

You can have a database of images. I've never tried it with a merge but I see no reason why it shouldn't work. Seems much safer and more realistic to do it that way than expect recipients to have image files saved locally in a particular place on their hard drive. Then you wouldn't have to worry about link formats. Have you explored that option already?

If bandwidth is your concern, image files such as signatures should be quite small (so if they aren't, you would want to fix them) and shouldn't have much effect on bandwidth at all.
_________________
Cheers!
---Fox

WinXP Pro SP2, OOo Portable 2.3.1, OOo local 2.4 RC4
New OpenOffice forum: http://user.services.openoffice.org/en/forum/
Manuals: http://documentation.openoffice.org/manuals/index.html
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Melange
Newbie
Newbie


Joined: 10 Feb 2008
Posts: 4

PostPosted: Sun Feb 17, 2008 8:32 am    Post subject: Reply with quote

Thanks for the suggestion foxcole. I've played around with a local HSQL database following your advice, created a table with two colums (id, image), and a form to insert and edit that table. Then, in my OOo Writer template file, I inserted a form image control field, linked it to the column and it shows the image as expected, very nice. It seems it's not possible to phrase an SQL query that filters on a user-defined field in the WHERE clause (I've tried to check against the field user_initials, the "id" field in my database is actually the user initials). Is this possible or is my observation correct?

Looking around the web I found this information which describes exactly what I was looking for (a file-based approach), but apparently the rules outlined in that document do not apply for image file URLs.

Christian
Back to top
View user's profile Send private message
batonac
General User
General User


Joined: 02 Nov 2009
Posts: 38

PostPosted: Wed Feb 17, 2010 5:50 am    Post subject: Reply with quote

Melange wrote:
Thanks for the suggestion foxcole. I've played around with a local HSQL database following your advice, created a table with two colums (id, image), and a form to insert and edit that table. Then, in my OOo Writer template file, I inserted a form image control field, linked it to the column and it shows the image as expected, very nice.


Could you describe in greater detail exactly how you did this? I'm sorry but I can't figure it out. Did you use a macro? Inserting images into a database works fine for me, but getting (any of) these images into a writer document does not.
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 Writer All times are GMT - 8 Hours
Page 1 of 1

 
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