Auto generation of documents program (mail merge)

hi everyone
i wanted to write a program to allow user to create a particular letter just by clicking a button,
now this file is first store in xml form, when user initiates the document generation the program will get xml element from the database and transform the xml to xsl and then finally to rtf.
what would be the best parser for this,
i seen a lot of xml example files and they are all relatively small, i'm wondering is it not a good idea to write an xml file of two or three pages long consisting a relatively small xml element but has great deal of text in it.
lastly i take that for formatting purposes i still have to convert the xml to xsl then only rtf?
thanks in advance

I interpret "best" as "most convenient" since you haven't provided any other useful meaning for the term. In other words, the best parser is the one you already have when you installed Java 1.4.

Similar Messages

  • Import data from SQL Server into MS Word document for Mail Merge purpose ?

    Hi,
    Is it possible to import contacts from SQL Server into MS Word for mail merge purpose or if retrieving data from MS Excel can we update the data in MS Excel sheet without opening it ?
    Note: Remember when you open a word document already set up for mail merge, asks you to run the query to return all records from the excel sheet it is connected to.
    Khurram

    Word and the current data source dialog do not really give you any help with that.
    You either have to be able to create a View in SQL Server that performs the query you need, then connect to that, or you have to be able to create the correct query manually (or perhaps using some other query tool that can help you), then use VBA to connect
    using that query. 
    For example, if you have been through the connection process once (connecting to a single table) then you will have a .odc (Office Data Connection file) which has the info. needed to connect to the correct server and database. It's a text file with some
    HTML and XML inside. You can copy/rename it. Let's say it is called "c:\a\myodc.odc" Then in VBA you can use something like
    ActiveDocument.OpenDataSource Name:="c:\a\myodc.odc, _
    SQLStatement:="put your SQL statement in here, and if it is long,...", _
    SQLStatement1:="put the second part in here"
    You get a maximum of either 255 or around 511 characters in the SQL statement, and Word tends to impose some syntax requirements that Transact-SQL does not, so e.g. you may need to quote all your table names.
    You can also se an empty .odc file and provide connection info. in the COnnection:= parameter in OpenDataSource.
    As background, until Word 2000, by default you would use MS Query to create your SQL query, and MS Query does have facilities that can help you build your query (a bit like the ones in MS Access). That may still be possible (it is a bit harder to find the MS
    Query option now, and I am not sure it works with the latest versions of Word). MS Query only works for ODBC queries, and they do not always work correctly when you actually issue the query using ODBC from Word, because of a Word problem to do with Unicode
    fields in SQL Server. But you could probably still use MS Query to help you construct your SQL. (It's probably easier to do that in Excel, though).
    Peter Jamieson

  • Why is my header/footer missing when I mail merge in Word 2013?

    I have just converted from Word 2007 to 2013 and now I am having an issue with my mail merge document. My mail merge document has our company letterhead set up in the header/footer. When I finish the mail merge by selecting 'Edit Individual Documents' using
    an Outlook contacts list - the first page is missing the header/footer but all the others are correct. 
    I use this document and mail merge every few days so this is going to cause me much grief if it can not be resolved.
    I have never experienced this issue before and I consider myself an advanced Word user.
    Has anyone else had this issue and knows how to fix it?

    Hi,
    According to your description, my understanding is that the first page of the Word document lost
    the header/footer, but the other page display well.
    If it is, please try the methods and check if it is helpful:
    Click on File>Options>Display and make sure that there is a tick mark in the box for "Show white space between pages in Print Layout view."
    Then, do you use DOC file (Create in Word 2007) or DOCX file?If
    you use Doc file, I recommend you convert it to DOCX file to test.
    If I misunderstand something, please let me know.
    Regards,
    George Zhao
    TechNet Community Support

  • Word Mail Merge using Powershell

    Hi all,
    I'm working on a script that automates account creation and notification for our students. I've completed a significant chunk of the script and have it successfully creating AD accounts and e-mailing students their credentials to access our system from
    a batch job that runs nightly. I want to add an additional part that will create a document using a Microsoft word template that is associated with a CSV file that the script will be populating each day it runs. The goal is to create a mail merged PDF that
    I can give to our admissions folks that has all the pertinent information for students to login. They will put these documents in their admissions packets or hand them to new students so they can login to the student system. I think I'm almost there as
    I can get word to create a PDF of the template. The only problem is I have no idea how to get it to execute the mail merge so that the pdf contains the actual data I need it to. Currently all I end up with is an export of the template itself in PDF
    format.
    I'm sure the problem with this is that I'm having trouble calling the .net functions for Word via powershell. Online I see various documents on how to do this with vb.net however Powershell instructions seem to not exist. I'm sure the actions are quite similar
    but I need some help. Here is the section of the code I have currently:
    $filename = "EmailTemplate1.dotx"
    $filename2 = "EmailTemplateProc.pdf"
    $word=new-object -com Word.Application
    $doc=$word.Documents.Add($filename)
    $word.Visible=$False
    $word.ActiveDocument.Fields.Update()
    $doc.WdMailMergeDestination.wdSendToNewDocument
    $word.ActiveDocument
    $Doc.saveas([ref] $filename2, [ref] 17)
    $Doc.close()
    $word.Quit()
    I'm sure the problem lies somewhere at the $doc.WdMailMergeDestination and onward. Basically I want it to take the dotx file which already has the templated document with mail merged fields and save an executed mail merge as a PDF. Any insight
    would be great.
    Thanks in advance!

    Not quite sure about that command line thing. I looked all through the support doc you posted and see nothing mentioning executing a mail merge via the command line. Is there something else i'm missing here? Can it be done with a macro?
    Like I posted.  As how to do a mail merge in the Word forum.  You can run a macro from the command line or you can trigger the merge from a startup macro.   The macros will reside in a template which will be specified on the command line
    alone with the new document name and location.
    You can create the macro in a minute with the macro recorder.
    ¯\_(ツ)_/¯

  • Mail merge in PAGES and NUMBERS has GONE!

    A while ago I painstakingly moved data and documents from Microsoft Excel 2008 for Mac to Numbers and from Word to Pages. I have been using Numbers for data lists and Pages for Mailmerge documents successfully since 2011.
    With the latest "update" to Pages and Numbers, I thought I would see improved software and performance. What I got was a downgrade in functionality.
    * Pages no longer supports mail merge
    ** Pages documents with mail merge fields are corrupted on opening them with the new version - SAVE THE ORIGINAL FIRST !
    * Numbers documents can no longer be used with the previous version of Pages to perform a mail merge - the headers are not being recognised!
    WORK AROUND
    Don't use the new Pages or Numbers.
    Keep your old Pages and Numbers documents in a safe folder.
    Use the prior versions of Pages and Numbers for mail merging (HOPEFULLY APPLE READS THIS AND PUTS MAIL MERGE BACK IN THE NEXT FIX)
    It is possible to maintain Numbers documents using the new version. This however necessitates saving your modified Numbers document in the old format (Save As...) before using it with the prior Pages version.
    @APPLE: PLEASE RECOGNISE THIS MAJOR PLANNING ERROR ON YOUR PART AND GIVE US THE FUNCTIONALITY BACK ASAP !!!

    I agree with Peter. This is NOT a forum for filing complaints directed at Apple. They do make that clear.
    Paul, I suggest you channel your frustration toward Apple at their Product Feedback page: http://www.apple.com/feedback/
    Mac

  • MAIL MERGE DOCUMENT ON SHAREPOINT

    I have a word document name list saved on my desktop that I use as a database when doing a mail merge. The letters I use as templates however are all stored on a SharePoint 2013 document library. When I tried to do a mail merge using one of these letters
    (editing in word) the option for inserting merge field was greyed out. Is there a work around for this? Is there any way that you can create a mail merge from a document stored on SharePoint at all? 
    Thanks, 

    http://answers.microsoft.com/en-us/office/forum/office_2007-word/word-mail-merge-to-excel-both-files-on-sharepoint/8fe7b8b6-3355-41a9-a92c-7a93b6e8f388
    It is certainly true that an Excel data source would have to be on the local file system (i.e. on the user's workstation) or accessible via Windows networking. It can't be located at a URL such as ftp:// or http://, and know of no way to specify the location
    of an Excel file in a Sharepoint system other than that. 
    As for the Mail Merge Main document, I would guess it was enough to open that from Sharepoint in the usual way, but until I get my Sharepoint sites back online I can't verify that for you. 
    > Doesn't that defeat the purpose of having the documents on a SharePoint site if everyone ends up putting both documents on the local pc?
    Yes, as far as mailmerge is concerned, if you have to use Excel data sources. 
    I don't know exactly what Microsoft's perception of Word's MailMerge features is, but I would say that they have mostly been in "maintenance mode" for many years, i.e. hardly any features have been added, very few of the common problems are
    ever fixed or even documented, and so on. So broadly speaking you either have to live with the facilities that you can get to work, or find other approaches - I would guess the Microsoft expectation is that a corporate would probably have centralised its
    mass mailing operations (so, e.g. you probably have all your data in a server database such as SQL Server, not in Excel sheets), and would have the resources to pursue other approaches to mass mailings (such as using a report generator, or using Word +
    .NET programming + content controls).
    Although it would typically have its advantages, even shifting data to a server such as SQL Server is not a panacea because you then have to ensure that you, or the end users, can select the correct data for each merge.
    But even if you /could/ use an Excel data source directly from Sharepoint, I suspect there might be some coordination/workflow issues to solve in a multi-user environment. 
    You might also be able to use Sharepoint lists as data sources, but because Word does not really know how to connect to them as data sources, you would probably have to have an Access licence for each user, and connect indirectly, and the multi-user/workflow
    implications of that approach are unknown to me.
    If this helped you resolve your issue, please mark it Answered

  • Mail merge and print one document at a time?

    Hi all. I'm an Apple revert. I'm currently using the i7 iMac. Previous Apple computer was a //e.
    I print an 8 or 12 page newsletter for my work. I want my printer/copier to fold and staple each document individually. Pages seems to send all documents to the printer in one huge file. How do I mail merge and print one document at a time?
    [In Windows Publisher, there's a registry hack to make Pub print one at a time. Anything similar on a Mac?]
    Mike

    Hello
    As you saw wrongly my first name I'm not too surprised that you missed the beast
    In fact it's not surprising that you missed it.
    I prepared the archive but forgot to upload it
    Download :
    For_iWork:iWork '09:découpe_PDFs.zip
    Yvan KOENIG (VALLAURIS, France) samedi 27 août 2011 11:29:37
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Is there a way of using a mail merge function while on the iphone or ipad, i wish to email a "Word style, ot TXT" document to 250 of my contacts

    Is there a way of using a mail merge function while on the iphone or ipad, i wish to email a "Word style, ot TXT" document to 250 of my contacts, I have tried downloading my contacts to my PC's outlook but only 1 contact comes across at a time despite the fact that Icloud says downloading namedperson + 249 other contacts to a CSV file

    Hi everyone!
    Looking also for an app that allows me to merge email and send them out to each recipient individually. Apparently that's not possible yet. Here's what the guys at RedbitsApps told me about Group Email capabilities: 
    "The current version of the app relies on the device operating system to send the emails. For this reason, sending individual email instead of a single email to multiple recipients is not possible. Apple doesn't allow apps to send single emails to many recipients easily. We may use a custom sending software in a future version."
    Let's keep looking guys... 

  • In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE!

    In Pages 09 we can do Mail Merge and Import Styles from a document. Can someone please explain how we can do this with the new version of Pages 5.1. Even Apple solutions are only valid for Pages Version 09. What a DOWN GRADE! Thank god Pages 09 is still there.

    …and the other 98 missing features.
    Just use Pages '09, which should be in your Applications/iWork folder.
    Rate/review Pages 5 in the App Store.
    Peter

  • Word document/mail merge with values from Reports

    Hi All gurus
    Using apex 4.1.1 , linux , 11gr2
    Basically I have requirement to generate a Word doc (letter to a Word mail merge) from a button/navigation link pressed on Apex page which will gather data from the report and fill in values in appropriate place in Word doc.
    Is this even possible with Apex with/o BI Publisher
    I have Fop installed and tested , PDF works great but excel and RTF is not reading the encoding on attachment download.
    Any help gratefully appreciated as always !
    PS I am aware of new PDF feature in 4.2.2 but upgrade is just not the scope right now.
    Thanks

    Hi, Tony:
    I am working with Hunk09 on this problem. I checked the demos of this PL/SQL lib, it looks powerful, yet we need a short time solution considering our schedule, as our request is just to insert some values into a static RTF document so user can print letters in batch by clicking link and downloading RTF file. I noticed our legacy system is using owa_util.mime_header following with htp.p to produce file, does APEx support this still? Also you have any hint about providing download link in APEX?
    Thanks.
    Sam
    Edited by: lxiscas on May 8, 2013 2:59 PM

  • Mail Merge from Microsoft Word 2010 to "Individual" PDF documents.

    Hi Adobe brothers and sisters,
    I need help with this one.
    I'm Mail Merging over 300 letters and each letter has seven pages. What I'm currently doing is mail merging from Excel to Word then printing it into a single PDF document. Once printed, I select each seven pages and then reprinting in PDF with the name its intended for? This is very time consuming and hoping there is an easier way.
    Is there a way to save each individual PDF documents (each letter) and have them labeled by a specific name listed on the letter intended for (eg: surname) without going through this lengthy process.
    Regards,

    I've developed a tool that will allow you to extract each group of 7 pages
    into a single file with just a few clicks. See:
    http://try67.blogspot.com/2012/01/acrobat-extract-groups-of-pages.html
    However, the file names of the generated files will be generic. If you want
    to use some text from the pages themselves in the file names, that might be
    possible, but would require a more complex script. Contact me personally to
    discuss it further.

  • MS Word 2007 Mail Merge Doc save as changes content of other documents everytime I save as a new document

    Have a mail merge initiated in Access that creates a Merge document. When I save the document as newXXX.doc..........., doc is saved but internal contents of oldXXX.doc are also changed to match last saved document. Help please.

    That suggests you are saving a copy of the mailmerge main document instead of executing the merge to create an output document - which is the one you should be saving. Consequently, with your current process, the saved document remains linked to the data
    source.
    Cheers
    Paul Edstein
    [MS MVP - Word]

  • How do I convert mail merge documents to individual pdf docs and save each with a field in the merge?

    How do I convert mail merge documents to individual pdf docs and save each with a field in the merge?

    Is this an actual field, or just some piece of static text somewhere? Either way, you can't do it using the Split Document command. You'll need to use a custom-made script to read the value of this "field" and use it when extracting pages from the file.

  • Mail Merge Documents

    I currently have a report which comes out of 'Answers'. Now there is a need to automatically generate documents from this report. In other words mail-merge. I think BI publisher is the way to go.
    Your thoughts?
    Thanks,
    Dinesh.

    If you are talking about mail merge concept, which is delivering the same report with different content to multiple users. Then there is a concept called Bursting in BI Publisher will work. Take a look at BI Publisher bursting feature.
    Check this tutorial from Oracle
    http://www.oracle.com/technology/obe/obe_bi/bipub/advance/advance.htm#t4s2
    - Madan

  • How to mail merge a document with in database?

    Dear All,
    I would like to know how to implement mail merge functionality in side pl/sql body. I could open, edit a document using the package ORDWord. Morethan, that anybody know, how to merge the documents ?
    Or please let me know any other workaround apart from this?
    Regards
    Balaji

    Hi,
    There are tow ways :
    The first one is :
    - load the list of tables of the Database in a Vector for exemple by using methode DatabaseMetaData.getTables () and you can test if the table exist or not in the vector by using methode Vector.contains(Object o).
    The code seems Like that :
    // Loading List Of Tables
    // you need to load the list of tables at the begening of
    // your class
    Vector listOfTables = new Vector();
    try
    rs = yourConnection.getMetaData().getTables();
    while (rs.next())
    listOfTables.addElement(rs.getString(3));
    catch(SQLException exp)
    // When you need to test the existance of table name
    // you add this line
    if(listOfTables.contains(tableName))
    // your code
    The second one :
    try
    //execute your query
    catch
    //Create your default JTable
    I hope that my response can help you!
    Ciaou,
    Anis

Maybe you are looking for