<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000099">
    I have a spreadsheet with a named range "pdfReport" to export<br>
    to pdf in the default location.  The data changed based on student<br>
    number input to another named range "_pid".<br>
    <br>
    Assumptions:  the spreadsheet is already open and on the correct<br>
    sheet.  This doesn't matter, as we will be selecting the cell and
    the<br>
    print range anyway.<br>
    <br>
    So I need to do something similar to:<br>
    <br>
    howmany = 16                  # number of students to process<br>
    <br>
    for c from 1 to howmany  # begin loop<br>
    <br>
        select _pid<br>
        typein c  and press enter  # this changes the data in the report<br>
        select _filename                # this is a cell which has a new
    filename for each report<br>
        copy cell                            # this gives me the
    filename to paste later<br>
        select pdfReport                # select the range to export<br>
    <br>
        # the menu choices are  File>Export as PDF><br>
        # then the next dialog box gives choices but the only<br>
        # choice I want is in General (default tab)<br>
        # Range has All selected, I want Selection selected<br>
        # then Export or Enter pressed<br>
        #This is followed by a prompt for file name<br>
        Paste filename from above<br>
        Export<br>
    <br>
    next c<br>
    <br>
    ideally, my first task would be to copy a cell or pass a variable
    containing the number "howmany"<br>
    so this would work for any of my classes.<br>
    <br>
    Thanks in advance for getting me started with this.  I'm in the
    process of learning python from<br>
    the excellent tutorial at <a
      href="http://learnpythonthehardway.org/book/ex0.html">Learn Pyton
      the Hard Way</a>   Although, it is not really the hard way, but
    rather<br>
    quite simple but time consuming for someone unfamiliar with Python
    and the UNO Basic dispatch of <br>
    both OpenOffice and LibreOffice.<br>
    <br>
    Best Regards,<br>
    Jim<br>
    <br>
    <br>
    <br>
  </body>
</html>