Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Merge Picture (Read 3782 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Merge Picture
Dec 20th, 2005 at 4:55am
Print Post Print Post  
Hi -

I don't know whether this is a "how to" question or a "How I Wish" for version 2.0.

I am creating 200 + "admitting tickets" for a function.  I am using merge fields to enter the name on a business card.  Most of the source records have pictures.

What I want to do - and don't see a way how - is to "merge" the picture in to the business card. 

PLEASE TELL ME that there is some way I can do this.  Since the record itself only contains the "path" to the picture, I am not optimistic.

The only solution I have come up with is to create a merged file and then manually insert the appropriate picture in to each card.  This would be a horrendous amount of work.

If a merge (per se) can't be done, then I am hoping at least there is some way to simplify the task.

Any suggestions?

If there is not currently a way to do this, then PLEASE, PLEASE consider the possibility for a future release of Sesame.

Thanks!

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Merge Picture
Reply #1 - Dec 20th, 2005 at 1:18pm
Print Post Print Post  
Tom Marcellus just did this for an event  coordinator in Vegas who needs to print photo badges on-the-fly. He also showed it at the User Conference.  He said that, on it's maiden voyage, the application performed flawlessly with six simultaneous users wireless under "combat" conditions for three straight days.

He may also have written it up. I know that you can use PrintString, PrintBox and PrintImage to print text and images wherever you want them to create very nice output.
« Last Edit: Dec 20th, 2005 at 2:44pm by Hammer »  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Merge Picture
Reply #2 - Dec 20th, 2005 at 3:05pm
Print Post Print Post  
Erika,

I am also trying to merge a photo from Sesame. I cannot use PrintImage, because I need to merge the data with MS Word. The formatting I have set up in Word is simply too complex to build with SBasic commands - I am building a "Book Fold" type layout for a church directory.

So my question is, do you know how to make Word include a picture by merging just the filename of the photo? I know there is an INCLUDEPICTURE type of Merge Field in Word, but I haven't yet figured out how to use it.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Merge Picture
Reply #3 - Dec 20th, 2005 at 3:34pm
Print Post Print Post  
Quote:
So my question is, do you know how to make Word include a picture by merging just the filename of the photo? I know there is an INCLUDEPICTURE type of Merge Field in Word, but I haven't yet figured out how to use it.


This works for me for an export out of Gems:
{ INCLUDEPICTURE  "c:\\Sesame\\Pics\\{MERGEFIELD "Image"}" \d}

You do have to do some fussing to get Word to actually update the pictures though. You can't just go to the printer. You have to merge to a new document, press Ctrl-A, then press F9 to make Word update the pictures.

Cindy Meister wrote a nice step-by-step here:
http://www.computorcompanion.com/LPMArticle.asp?ID=126 ;

  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Merge Picture
Reply #4 - Dec 20th, 2005 at 5:06pm
Print Post Print Post  
Thank you so much, Erika! This was exactly what I was looking for. (And, I suspect, the same answer that Spencer wanted as well.)

It was a bit tricky, though. For some reason it simply would not work not matter how many times I tried it, until I exited Word and re-opened the document. Then, it worked on the first try. With all the playing around before that, I must have confused Word, or caused some other issue.

In any case, it works great now. Thanks again.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Merge Picture
Reply #5 - Dec 20th, 2005 at 6:02pm
Print Post Print Post  
Trouble in paradise. ???

All seemed to be working great, until I saved the document. After saving, this is what the Merge Field contains:
{INCLUDEPICTURE "../Pics/PICT0159.JPG" \* MERGEFORMATINET \d }

Before saving the file, the merge to a new document works properly. But after saving, every record just contains the same photo. Do you know what is happening?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Merge Picture
Reply #6 - Dec 20th, 2005 at 6:43pm
Print Post Print Post  
Well, your slashes seems to be going the wrong way. And they need to be doubled.

Also, the \d tells Word to link the picture data rather than saving it with the document. I believe it needs to be before the \* MERGEFORMAT comment.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Merge Picture
Reply #7 - Dec 21st, 2005 at 3:13am
Print Post Print Post  
Quote:
Well, your slashes seems to be going the wrong way. And they need to be doubled.

They were the right way (and doubled) before saving the file.

Quote:
Also, the \d tells Word to link the picture data rather than saving it with the document. I believe it needs to be before the \* MERGEFORMAT comment. 

Again, that all changes the moment I click on the "Save" icon. It was working correctly before saving the file. Once I click the icon to save it, I can see this:
{ INCLUDEPICTURE  "c:\\Sesame\\Pics\\{MERGEFIELD "Image"}" \d}
change to this:
{INCLUDEPICTURE "../Pics/PICT0159.JPG" \* MERGEFORMATINET \d }

"PICT0159.JPG" is the name of the image for the first record in the batch, which after the save, becomes the image for all of the records. It seems that Word does not like to save one Merge Field embedded inside another one.

Any ideas?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Merge Picture
Reply #8 - Dec 21st, 2005 at 3:20am
Print Post Print Post  
Carl -

Any chance you can call me at (813) 286-8498.  I'm having a problem getting even as far as you got (although at least I'm encouraged that it now sounds feasible).  I'll be up till about 1 a.m.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Merge Picture
Reply #9 - Dec 21st, 2005 at 3:37am
Print Post Print Post  
Hi -

I just want to "back up" a bit.  I went to sleep very late last night so didn't get to look at this until late in the afternoon. 

I have played with it for hours and cannot get it to merge no way, no how.   

I am optimistic based on Carl's results that it can probably be done.  Now, it's just a matter of getting the process down pat, I hope.

I am using:

{ INCLUDEPICTURE  "c:\\Sesame\\Data\\Pics - Middle Villagers\\{MERGEFIELD "Photo"}" \d}                           

I changed "Image" to "Photo" because I am assuming that this is the name of the LE which contains the path to the picture.  Is this correct?

     
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Merge Picture
Reply #10 - Dec 21st, 2005 at 4:14am
Print Post Print Post  
Hi Spencer and Carl......

Just ran across this.  Thought this might help you.  If not, at least it will confuse you some more.

Quote:
Merge in a picture from a database

Word cannot merge a graphic or OLE-object directly from a database because it does not understand the type of data the database sends across (long binary). Therefore, you have to workaround this obstacle.

   1. Save the graphics files in a folder (directory) on a drive
   2. Place the file name (or path information) in a field in the database
   3. Reference the graphic file information by nesting the merge field in an IncludePicture field.
     Example: { IncludePicture "C:\\Data\\Pics\\{ Mergefield Signature \* upper }" }
   4. You must now merge to a new document.
   5. Update the field display so that each record shows the correct picture. (You can press Ctrl+A to select the entire document, then F9 to update the fields.)

Note the double backslashes in the example, as well as the double-quotes. Both are necessary if the field is to work correctly.
This was from http://homepage.swissonline.ch/cindymeister/mergfaq1.htm

Hope it helps.

I will check my notes from Tom's presentation......
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Merge Picture
Reply #11 - Dec 21st, 2005 at 4:41am
Print Post Print Post  
May not be available here for a few weeks, trying to make my last contributions for the year.......

Tom's ID program with the members' photos is done with Print String, not with Mail Merge.  Very simple, and flexible, and does not require Word.  Sends output directly to the printer.

No copy of document is saved since it never exists.  It is an on demand type of application.  Can be called at any time from a button on the form.

Would like to share the code with you, but I am not sure of copyright restrictions.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Merge Picture
Reply #12 - Dec 21st, 2005 at 4:47am
Print Post Print Post  
I am comfortable that we can do what we want with the code from the conference CDs.  It sounds like what Tom presented is exactly what you are trying to do.

So here is the code that Tom used to print out ID badges:
Code
Select All
var vLogoFont as String = "Anna"
var vFont as String = "Arial Black"
var vFont2 as String = "Lucida Console"

// See www.carolinabarcode.com
var vBarcodeFont as String = "CarolinaBar-B39-25D1"

If @Askuser("Print a membership card for " + First Name + " " + Last Name + "?","","") Then
{
NewPage(850, 1100)

PrintPageMargin(25,25,25,25)

// Print logo
PrintImage(@ImagePath() + "\" + "Flacid Valley Fitness.png", 0, 0, -1, -1)

// Print watermark
PrintImage(@ImagePath() + "\" + "Hackensack.png", 50, 50, 80, 80)

// Print Photo at right
PrintImage(@ImagePath() + "\" + Photo, 225, 50, 138, 103)

PrintString(First Name, 30, 50, 0, vFont, 24, 0)
PrintString(Last Name, 30, 76, 0, vFont, 24, 0)

PrintString("Member No. " + Member ID, 0, 130, 0, vFont2, 14, 0)

// Print barcoded ID number
PrintString("*" + Member ID + "*", 0, 150, 0, vBarcodeFont, 24, 0)

PrintString("Member Since " + @Month(Membership Date) + "/" + @Right(@Year(Membership Date), 2), 180, 165, 0, vFont2, 10, 0)
PrintString("Expires " + @Month(Expiration Date) + "/" + @Dom(Expiration Date) + "/" + @Right(@Year(Expiration Date), 2), 180, 180, 0, vFont2, 10, 0)

AlternateDefaultPrinter("PDF995")

FinishPage()

RestoreDefaultPrinter()

} 


As I noted earlier, it is short and simple.

It should be noted that this is just a small part of his application that uses small camera to capture photo, store it, and tie it into database for immediate printing.

Thanks to Tom Marcellus for sharing his work with us.  Gotta go to those annual conferences.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Merge Picture
Reply #13 - Dec 21st, 2005 at 4:11pm
Print Post Print Post  
Carl and Spencer,

What version of Word are you using?

Here are the steps for doing this in Word 2000

Open Word 2000
Open your Existing Merge Document
Put the cursor where you want the image to appear
Click Insert
Choose Field
Under Field Names Choose 'IncludePicture', It is under the 'Links and References' Category
Click Options
Choose the \d Switch
Click Add to Field
Click OK
Click OK
***This will insert a field that looks like {INCLUDEPICTURE \d  \* MERGEFORMAT } into your document
Click Right after the word INCLUDEPICTURE
Hit the Space Bar
Type "C:\\Sesame\\Pics\\         or the path to your images
****NOTE: You need that first double quote mark
Click Insert Merge Field
Choose your image element
Type a "
Hit Alt F9
****Do not panic. You may get a Message that says "Error! Filename not specified." I get that message and mine works.
Click the 'Merge....' button
Select 'New Document' from the 'Merge to:' drop down list
Click the Merge button
Hit CTRL A
Hit F9

You now have a Merge Document with pictures. Be sure to save the document that you are merging from.

Happy Holidays
-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Merge Picture
Reply #14 - Dec 21st, 2005 at 6:51pm
Print Post Print Post  
Ray,

Spencer and I spoke on the phone last night, and we are both getting our document to merge with pictures. The problem is, when we try to save the main document (the one where we build the merge field), the field code changes to this:
{INCLUDEPICTURE "../Pics/PICT0159.JPG" \* MERGEFORMATINET \d }

Before saving the main document, I see the correct field code, which looks like this:
{ INCLUDEPICTURE "C:\\Sesame\\Pics\\{ MERGEFIELD Photo }" \d \* MERGEFORMAT }

I can be looking right at the field code, and see it change as I click on the Save icon. If I look at the Undo history dropdown, that change has the name "Link Update". I can undo the Link Update, and merge just fine. But if I leave the Link Update in place, the merged document just has image boxes with a small red "X". Obviously, the link is getting broken, not updated.

Do you know what "..INET" means at the end of MERGEFORMAT? Do you know what might cause the Link Update to go haywire?

BTW, I am using Word 2002 SP3, and Spencer metioned that he is using Word 2003.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print