AppleScript for mail merge

What is AppleScript for mail merge

AppleScript is a programming language that is tied to certain Applications that support it. Pages v5.5.1 has a scripting dictionary of the terms it will support via AppleScript. Apple's answer to not including Mail Merge functionality in Pages v5.5.1 is for individual users to roll their own, download an example and adapt it, or use another application with built-in Mail merge features.
See my previous post to you.

Similar Messages

  • AppleScript for mail merge with Excel data?

    Is there any approach for an AppleScript that lets you use Excel data as source for some kind of mail merge operations? If not, would anyone here be interested if someone (I?) would take a closer look at some kind of a (AppleScript Studio) solution for this?

    I'm not sure I get the question.
    If it is "could you use AppleScript to create mail merge for Pages with Excel?", the answer is, Yes. Both Pages and Excel are scriptable.
    If the question is "has anyone done it yet?", I don't know, but it could be a fun exercise.
    If the question is "would there be a market, if someone (you?) wrote and released such a script?", I cannot tell, but personally I would probably write a hack that worked only for my own needs - if I had them. The overhead with usability, testing, different address formats, languages, different Excel sheet formats, and so on, makes me guess that the investment wouldn't pay off for a generic solution. Especially considering both Pages and MS Office already have their own mail merge functions.

  • Can I use FileMaker as a source for mail merge in Pages

    Can I use FileMaker as a source for mail merge in Pages

    Sorry I posted this and then started reading some of the replies. I did see them as I am newbie here.
    Looks like the only solution at this time is to export the data to a csv file, open it in numbers and use the numbers file as the source for the mail merge.
    Would it be possible to have FileMaker then run an applescript ? or automator script to automatically convert the CSV file to numbers and then rename that Numbers file so that it is consistent and can be reused by the Pages "template" for subsequent documents to be used based on this template?

  • 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

  • Leveraging Book of Business for Mail Merge

    I'm looking for some advice from the community on how I can make use of the Book of Business for segmenting records for mail merges?
    Bascially, I want to restrict my mail merge to contain only those contacts who are linked to a specific Book of Business. Problem is I'm not quite sure how best to achieve this!
    Thanks in advance,
    Cameron

    Cameron,
    I don't believe you can get a list of records attached to a book (wish you could), you'd need to create the list based upon your rules for assigning BOB's. For example with a company i setup BOB for we assigned the books by region. So where location = north then assign to North book. Your list would then be where location= north.
    hope this helps.
    Alex

  • Applescript for Mail Question

    Is it possible to create an Applescript for Mail, that, when an email with a specific subject line arrives in my inbox, an attached photograph would get sent immediately in response to the person who sent the email.  The subject lines would vary (e.g., people_1, or, places_16).  Every subject line would have a corresponding photo located somewhere on my hard drive (there would be hundreds of possibilities - the catalogue would be concentrated in one place).  So, for example, when "places_21" hits my Mail in box, an email would be generated in response, automatically, with a photo (places_21) attached.  Thank you!  Marcos

    Actually, it's not that hard to do, it's just that there are a lot of use cases, and a lot of caveats to consider.
    For example, do you intend/expect to work from a predefined list of image file names? Or do you want/expect to react to any filename that's requested?
    You say that the files would be 'somewhere on my hard drive'... how does the script know where to look? How does it resolve filename conflicts? What should happen if a file can't be found?
    As fane suggests, you should also consider an audit log, so you can see who asked for what, and when, along with errors that occurred on the way.
    So it's entirely do-able, just a lot of questions to answer before you get started.

  • AppleScript support for Mail Merge

    how can I Create mail merge on new pages

    Mail Merge is not built into any version of Pages v5, as it was in Pages ’09 v4.3. Instead, one must understand AppleScript to simulate Mail Merge. Here is an example article and code.

  • How do you change the default size of the print batch size for mail merge in Publisher 2010?

    I appended this question to another thread with the same topic but have not received a reply, so I'll try with a new question. Publisher 2010, when doing mail merge, will only merge and print two records at a time. How do you change the default size of
    the print batch size? This is for a 4 page document, 8 1/2 x 11, printed two sides on 11 x 17. I've tried all the suggestions that were in the other thread. The response that was marked as the answer by the moderator is incorrect and does not work. Nothing
    suggested in that thread works. A registry fix that worked for Publisher 2003 won't work because the print batch size key does not exist in the registry for Pub 2010. At least not that I can find. Printing to an XPS document doesn't work. It asks for a filename,
    prints 2 records, asks for new file name, prints 2 records, asks for new file name, and so on. The same for printing to a PDF document. Merging to a new Pub document doesn't work. When I print that job every other sheet is turned over. I.e., sheet one has
    pages 1 & 3 on top, next sheet has 3 & 4 on top, and so on. This makes it impossible to run them through the folder. The same thing happens when I print that complete merged document to XPS or PDF. I have the latest drivers installed for our printer, a Toshiba
    2500C copier/printer connected via network. What do I need to do to to change the batch size to something reasonable, like 100 records?

    It's been two weeks since I posted this question. What does it take to get an answer? I cannot believe it's being ignored, nor can I believe that someone in MS doesn't have an answer.

  • Help needed with Custom Web ADI Integrator for Mail Merge

    Hello,
    I've created a custom web adi integrator to generate letters to advise of end of probationary periods.
    The problem is that at the end of the process when the letter is opened in Word 2007, it only displays one record, and does not allow me to "preview results" and cycle through the records (this part is greyed out). It appears that the letter is not merged with the data spreadsheet although it does display one record from it.
    Our EBS version is 12.1.3 and we are using Office 2007.
    These are the steps I have followed so far (in brief):
    - Create a view to provide data (names, addresses etc).
    - Set up a new custom function (similar to seeded function HR Integrator Setup).
    - Add the custom function and other functions to Desktop Integration responsibility.
    - Add the relevant functions to end user's responsibility menu.
    - Add new category "other" to HR_ADI_DOCUMENT_TYPE lookup.
    - Create Download Excel Integrator by choosing Desktop Integration -> HR Integrator Setup. Enter "PER" for application and my view for the View Name. Upload.
    - Create another Excel document by choosing Desktop Integration -> HR Maintain Form Function Associations, and choose the integrator created above. Enter my custom function name in the generated spreadsheet and upload.
    - Define a layout for the new integrator.
    - Run the integrator under the end user responsibility and save the resulting spreadsheet, which is full of data as expected.
    - Create the letter in Word, using the saved spreadsheet as the data source for the merge. At this point the merge is successful.
    - Go to Desktop Integration -> Document Management and upload the Word mail merge document. Associate it with the custom document type created earlier.
    - Link this document to my integrator.
    - Go in as end user responsibility and run the integrator.
    At this point after enabling macros it loads 2 spreadsheets (one full of data) and the Word document, but the Word document only displays one record (approx the 10th in the list - there are about 100 in total). All of the relevant merge-related menu items on the "Mailings" tab are greyed out.
    Can anyone offer any pointers please?
    I did wonder whether it mattered if I changed the names of documents, e.g when I download and save the resulting spreadsheet full of data which I then use to merge to in the Word Doc, is it OK to call the spreadsheet anything or should it be left as the default name?
    Many thanks,
    Hazel

    Hi Nandhakumar.P,
    thanks for your response. Please find the answers below:
    - Set up a new custom function (similar to seeded function HR Integrator Setup).
    System Administrator -> Application -> Function. Query back the seeded User Function Name = "HR Integrator Setup", make a note of the details, then add a custom function entitled "NTC_HR_LETTERS" with the same details.
    - Add the custom function and other functions to Desktop Integration responsibility.
    System Administrator -> Application -> Menu. Query back User Menu Name = "Desktop Integration Menu" and add the following functions:
    WITHOUT PROMPT
    a. HR Integrator Setup
    b. HR Maintain Integrator Form Functions
    c. HR Disable Integrator
    d. HR ADI Document Overwrite Page
    e. HR ADI Document Upload Page
    f. The custom function created in previous step ("NTC_HR_LETTERS")
    WITH PROMPT
    g. HR ADI Document Management Page
    - Add the relevant functions to end user's responsibility menu.
    System Administrator -> Application -> Menu. Query back menu attached to custom responsibility of end user that will perform the action once set up.
    Add the following:
    a. The custom function "NTC_HR_LETTERS" as created previously (without prompt)
    b. Desktop Integration - Create Document (With Prompt. This function will be used to generate letters)
    - Add new category "other" to HR_ADI_DOCUMENT_TYPE lookup.
    SA_Application Developer -> Application -> Lookups -> Common. Query back Type = HR_ADI_DOCUMENT_TYPE and add a new entry entitled "Other". This document type is later assigned to the Word document I upload and link to the integrator.
    I hopoe that answers your questions.
    Regards,
    Hazel

  • StringTokenizer for mail merging

    Righty'o
    the requirements is that we have to read some data in using BufferedReader, split it using some delimiters then mix this in with a template to produce an output file.
    the data to be read in is in the form
    Carl%f%
    Jung%l%
    %n%
    79 Cardgan St
    Carlton%a%
    Dr%t%
    SD2a%s%
    James%f%
    ..and continuing on for more people
    so, I have read the information into a String and then used String Tokeniser to split it up.
    using the delimiter % i get tokens like
    Carl
    f
    Jung
    l
    and so on. This is fine, i can work with this
    The problem i am having is that when the data between two delimiters spans two lines, such as
    %n%
    79 Cardgan St
    Carlton%a%
    StringTokenizer passes the token as
    79 Cardgan StCarlton
    this is not how i want it. I want the two lines to be preserved. How can i get StringTokenizer to keep the data that is spread over several lines to stay as several lines?
    If i dont fix this problem, the mail merge outputs the file with the address all on one line and not over several.
    Any help would be appreciated.

    i set up StringTokenizer as this:
    StringTokenizer dataSplitter = new StringTokenizer(theData,"%");
    so you end up with tokens like
    Token1: Carl
    Token2: f
    Toeken3: Jung
    Token4: l
    From what i notice, it is not using the \n character as a delimiter otherwise the different lines would be their own tokens, and this does not happen. It just seems to remove the fact that there on seperate lines.
    What is the character that makes the new line? \n for new line or \r for carriage return?
    One way i see to get around this, is when using readLine to read in the data, use StringTokenizer to check if there is more than one token. If there isnt, add a new line character to the end and hopefully it will be preserved in later parts.

  • No "Link" in Inspector for Mail Merge

    For doing mail merge, the turtorial says to click on Inspector, then Link ... but there is only Hyperlink. I am trying out Numbers 09. Am I doing something wrong, or does the trial version of Numbers 09 fail to have mail merge?

    The trial version if full featured. I don't know the tutorial you are watching. If you provide a link I'll see if I can figure out what it is saying. I don't think Numbers does "mail merge" by itself but it will accept data from your contacts which I believe you can then use in Pages to do a mail merge. You can also make a link within a cell that will create a new email message with the provided address, subject, and text when you click on it.

  • Label Templates for Mail Merge - Any ideas?

    Okay you guys, I want to RAPIDLY set up various label templates (as you can in WORD)  by selecting the label type ( manufacturer code) and off you go with your merging.  Problem is, I cannot find anything like that - or am I overlooking something?
    I have found how you set  up a Mail Merge field etc. But I cannot find any indicators ( even on the Help) as to where you can get label or equivalent templates... ALL help gratefully received...  even if it is staring me in the face! - I have broad shoulders!
    Here's hoping....

    Jerrold, thank you, however, it is more than just addresses, I have been used to creating all sorts of labels using logos, words etc. and "it just happened" - it sure aint at the moment!   I fear I may have to resort to Avery's on-line app and do it "in the clouds" not something I wish to do really...  I wonder what the reason is for not allowing such a core need in Pages at the moment? 
    Oh well !
    <SIGH!>

  • IPAD APP for mail merge ?

    Hi all,
    hope you can help...
    We currently go out to clients and get the information for quotations. We come back enter information such as Client, address, name, price etc into MS Excel and then mailmerge it with a template within MS word. This produces the quote and we email the pdf across to customer.
    Is there such an app for the IPAD that could do you same? I would like to pre enter the information I would know eg client, address etc... Then onsite type prices, this would then (then a templete) produce a quote which could be emailed before I leave.
    Thanks in advance for advice.
    David

    Hey,
    I know this is not a reply to your question but I just wanted to ask you about a problem I encountered while  mail merging. The steps I follow: Create a mail merge in Microsoft Word using the necessary steps ( I am pretty sure that they are correct) and  then press the  Finish & Merge button. The messages are then in my configured Outlook's outbox. The problem is that they have been in the outbox for a whole night ad not even one message got sent.
    Please reply if you kow the answer.
    Thanks.

  • Applescript for mail error can't get message id

    I have an applescript (found on internet) for Mail 4.5 that deletes messages in "on my mac" mailbox "Deleted Inbox" that are older than 120 days. The script runs from an iCal daily event. I drag messages from Inbox to "Deleted Inbox" when I don't want the message in Inbox, but I want to save the message for 120 days before deleting it. The script sometimes runs successfully, and sometimes gives error "Mail got an error: Can't get message id xxx of mailbox "Deleted Inbox"". Then in Mail, I "Mailbox / Rebuild" that mailbox, and run the script manually without error. How can I avoid that error? The script is essentially:
    tell application "Mail"
              set OldStuff to every message of mailbox TheBox where date received of it < OldDate
              repeat with ThisMessage in OldStuff
        delete ThisMessage
              end repeat
    end tell
    Thanks for any help.
    Ken

    How can I avoid that error?
    I don't actually know how you can avoid that error. However, maybe you can use a workaround and have the script rebuild the mailboxes automatically when such an error occurs. Try the following code:
    tell application "Mail"
      try
        set OldStuff to every message of mailbox TheBox where date received of it < OldDate
      on error
        activate
        tell application "System Events" to click menu item "Rebuild" of menu 1 of menu bar item "Mailbox" of menu bar 1 of process "Mail"
        delay 1 -- adjust if necessary
        set OldStuff to every message of mailbox TheBox where date received of it < OldDate
      end try
      repeat with ThisMessage in OldStuff
        delete ThisMessage
      end repeat
    end tell
    Since the above script uses GUI Scripting, you must enable the Accessibility Frameworks by clicking the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane.
    Message was edited by: Pierre L.

  • Export mail message as PDF Applescript for mail rules

    I have looked everywhere for this and found nothing. I don't have 40 hours to learn applescript myself but from the little I do know this should be possible. Probably easy.
    I want to created an applescript to run as a mail rule. I want the script to export the message as a PDF and move that PDF to a specified folder. Hazel can take it from there.
    for instance:
    Fedex sends me a email message that my shipment has been delivered.
    mail rule kicks in and runs the script
    script creates a PDF of the message
    message is moved to "fedex delivered" folder

    I found a workaround, though there must be something neater.
    I added this before my script
    tell application "System Events"
              tell process "Mail"
                        tell menu bar 1
                                  tell menu bar item "View"
                                            tell menu "View"
                                                      tell menu item "Sort By"
                                                                tell menu "Sort By"
                                                                          click menu item "Subject"
                                                                end tell
                                                      end tell
                                            end tell
                                  end tell
                        end tell
              end tell
    end tell
    then the same except "Date" instead of "Subject".
    My script does what i want now.

Maybe you are looking for

  • Create a report based on subform

    Hi  I have a Main form which includes a Subform that contains all the information regarding a meeting at a specific date. I would like to create a button, to create a report for only this specific date. How can I let user to generate a report when th

  • Process chain step by step documentation

    Hi friends, I am looking step by step documentation for process chains,please  send me documents. thanks for advace bye habeeb [email protected]

  • InDesign CS5.5 and Acrobat X crashing OS X system when making large pdf

    All of a sudden my mac has taken to crashing when I use ID CS5.5 to make a pdf. It seems to be mainly when making a larger pdfx1-a for repro. I've been doing this daily for months, no problem. Suddenly two days ago it became a problem. You send the p

  • Is there a name for 'WHERE 1=2' condition?

    I've got some pl/sql code which builds several string select statements and unions them all together. I have a situation where by i don't want one of the select statements to return any data, so i've used a condition which will never be met i.e. WHER

  • Can't get AirPort Express Setup Assistant to Work

    I'm having trouble just setting up AirPort Express. (All I want to do is play iTunes from a stereo system in another room.) I purchased an "AirMac Express base station" in Tokyo a few days ago, took it out of the box, and followed the instructions as