[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] reading a word doc



Thanks, i will try it and will let you know if it worked.

Ray Ontko <rayo@ontko.com> wrote:  Noah,

This is a bit of a long shot with lots of moving parts, but it might work:

1) Use MS Word to create your templates. Use special syntax within the 
document for substitution variables (e.g., "<>"). Save 
the templates as RTF files.
2) Use SQR to read the rtf file, look for the special substitution 
variables and replace them with values from the database, and produce a 
new RTF file.
3) Use rtf2latex2e (http://sourceforge.net/projects/rtf2latex2e/) or 
rtf2troff (http://www.snake.net/software/RTF/) or some other suitable 
tool to convert from RTF into latex/troff and then use latex/troff to 
produce PostScript, which then can be sent to the printer.

This should work, but depends heavily on whether the rtf translation 
tool (e.g. rtf2latex2e) supports all the features (including images) 
that you want in your output documents.

Note that this approach avoids the issues related to whether SQR 
supports the image formats involved, but does depend on whether the 
rtf2xxx tool supports the image formats.

Hope this helps.

Ray

Noah Panayotis wrote:
> Thank you all for your input. 
> 
> Ray, you've defined what I need to do correctly. To answer to your questions, 
>the sqr is running in Unix server ( both Solaris and IBM AIX) environment and 
>we are currently using SQR V6.0 but we're in the processes of upgrading to SQR 
>V9.2. 
> My templates will be created using word and a couple of them will have 
>graphics (.eps)
> 
> Thanks,
> Noah 
>
> Ray Ontko wrote:
> Noah,
>
> If I understand correctly, you want:
>
> 1) to be able to create templates using MS Word possibly containing 
> graphics and save them to a file that can be read by SQR,
> 2) have your application allow the user to select a template and a data set,
> 3) have SQR apply each row of a data set to the template file and 
> produce Postscript output to send to a printer.
>
> It would be helpful to know:
>
> 1) whether you're running SQR on a Windows server, Unix server (Solaris, 
> AIX, HP-UX, etc.), or something else.
> 2) what version of SQR you're running
> 3) what format the graphics are that you want to include (.eps, .gif, 
> .jpg, or what).
>
> Ray
>
> Jamie Harris wrote:
> 
>> Noah, 
>>
>> I tend to agree with the others here - this is extraordinarily
>> difficult to do all in one program. 
>>
>> Here's what I'd do if I absolutely had to do it without requiring any
>> user interaction:
>>
>> 1. Make a word macro in my template documents that does the mail merge
>> function (from a specific text file that your SQR creates) automatically
>> upon startup.
>> 2. In your SQR, create the file you need to print your letter from and
>> as the last step use 'call system using' to issue a "start" command (if
>> your app. server is a Windows environment) to cause Word to open your
>> document and perform the mail-merge. "Start" treats it's parameter as
>> if you double-clicked it, so you'd say 'start c:\templates\letters.doc'
>> for example and that document would open.
>>
>> The downside there is that you'll need to install Microsoft Word on
>> your app. server for this to work. Also if two people are running the
>> same letter at once, they'll conflict with each other - no easy way
>> around that unless you can pass command-line parameters into a Word
>> macro somehow. You can ease that a little by making the file name
>> different for each letter template used (make the text file name the
>> same as the letter template or something). If you have Peoplesoft 8.9
>> you can also set the process up so that only one person can run it at
>> once - a second person has to wait until the first is done. That would
>> help with your concurrency issue too. 
>>
>> If you don't have Peoplesoft or your app. server runs on some other OS
>> than Windows this idea won't work at all. It may not work even if you
>> do have those environments. 
>>
>>
>>
>> Seriously, though, it's a lot easier to make a word macro and give it
>> to the users, they can right-click the file, save it somewhere specific,
>> run the macro on it, etc. It's not that much farther away from them
>> choosing which letter they want and running the SQR. 
>>
>>
>>
>> -----------------------------------------------------
>> James Harris
>> Enterprise Application Analyst/Programmer
>> Information Technology Division
>> Frederick Community College 
>>
>> -----------------------------------------------------
>>
>>
>> 
>>>>> Noah Panayotis 1/14/2007 11:16 PM >>>
>>>>>
>>>>> 
>> My compelling reason for not using Word is because we are trying to
>> create a production program that would generate the letters at run time.
>> This is not a one time deal. Based on the users selection criteria,
>> I'll need to select the specific letter template to generate the letter
>> add the mailing address info as well as generate a report to be sent
>> along with the letter. I will need to do all this in one program using
>> sqr. So you see I really could not use WORD to do what I need to be
>> done. 
>>
>> Thanks,
>> N.P
>>
>> George Jansen wrote:
>> Do you have a compelling reason not to use the built-in mail merge
>> feature of Word? It certainly strikes me as the easiest answer.
>>
>>
>> _______________________________________________
>> sqr-users mailing list
>> sqr-users@sqrug.org 
>> http://www.sqrug.org/mailman/listinfo/sqr-users 
>>
>>
>>
>> ---------------------------------
>> We won't tell. Get more on shows you hate to love
>> (and love to hate): Yahoo! TV's Guilty Pleasures list.
>>
>> _______________________________________________
>> sqr-users mailing list
>> sqr-users@sqrug.org 
>> http://www.sqrug.org/mailman/listinfo/sqr-users 
>>
>>
>> _______________________________________________
>> sqr-users mailing list
>> sqr-users@sqrug.org
>> http://www.sqrug.org/mailman/listinfo/sqr-users
>>
>>
>> 
>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
>
> 
> ---------------------------------
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
> 


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users


 
---------------------------------
Need a quick answer? Get one in minutes from people who know. Ask your question 
on Yahoo! Answers.

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users