Define a path to save my converted pdf word document

Hello,
I would like to be able to define a specific place to save the pdf document I have converted from Word. The script I'm writing should normally able me to send to my customer a personalised mail with an attach pdf document. The mail and the pdf are personalised for each customer. I have put the script I wrote below. I will be really greatfull if you could help me ! Also if you see some improovement I can add to this script do not hesitate
Many thanks in advance.
Xavier
--Main Programme
set startCell to "A1" as string
set leSujet to "CES EduPack 2013 – Maintenance de votre installation"
--set leCorps to ("Bonjour " & leSujet)
display dialog "Enter the Name of the last cell in Excel " default answer "AA25"
set endCell to text returned of the result
set myMatrix to excelTxtExtract(startCell, endCell)
set custInfo to findInfo(myMatrix, 1) --récupération des mots clés
set partChoix to choose from list custInfo with prompt "Choose part(s) for file name :" with multiple selections allowed
set numList to posElmList(partChoix, custInfo)
--display dialog posList as string
set myFilenameWord to (choose file with prompt "Please select the Word Template doc for the Quotation :")
set partChoix to choose from list custInfo with prompt "Choose the email address :"
set emailList to posElmList(partChoix, custInfo)
--display dialog emailList as string
set partChoix2 to choose from list custInfo with prompt "Choose Title of the person :"
set title1 to posElmList(partChoix2, custInfo)
set partChoix3 to choose from list custInfo with prompt "Choose the Name of hte person :"
set name1 to posElmList(partChoix3, custInfo)
set partChoix4 to choose from list custInfo with prompt "Choose the Nbr of User of the Lycée :"
set seat1 to posElmList(partChoix4, custInfo)
set partChoix5 to choose from list custInfo with prompt "Choose the licence type:"
set licenceType1 to posElmList(partChoix5, custInfo)
set partChoix6 to choose from list custInfo with prompt "Choose the maintenance expire date:"
set expireMaint1 to posElmList(partChoix6, custInfo)
repeat with i from 2 to (length of myMatrix)
          set customer to findInfo(myMatrix, i)
          set email to nomFichier(emailList, customer) as string
          set title2 to nomFichier(title1, customer) as string
          set name2 to nomFichier(name1, customer) as string
          set seat2 to nomFichier(seat1, customer) as string
          set licenceType2 to nomFichier(licenceType1, customer) as string
          set expireMaint2 to nomFichier(expireMaint1, customer) as string
          set leCorps to "Bonjour " & title2 & " " & name2 & "," & return & return & "TEXTE"
          set nomDuFichier to nomFichier(numList, customer) as string
  wordTxtModif(myFilenameWord, customer, custInfo, nomDuFichier)
  envoiMail(leSujet, leCorps, email, nomDuFichier)
end repeat
--Envoyer Mail
on envoiMail(leSujet, leCorps, email, nomDuFichier)
          tell application "Mail"
  activate
                    set nouveauMessage to make new outgoing message with properties {subject:leSujet, content:leCorps & return & return, visible:false}
                    tell nouveauMessage
  make new to recipient at end of to recipients with properties {address:email}
                              tell content of nouveauMessage
                                        make new attachment with properties {file name:("/Users/grantadesign/Documents/" & nomDuFichier & ".pdf")} at after the last paragraph
                              end tell
  send nouveauMessage
                    end tell
          end tell
end envoiMail
--Nom du fichier
--Retourne le nom du fichier sans l'extension "Lycée F.Xavier"
on nomFichier(numList, customer)
  activate
          set nomDuFichier to {}
          repeat with i from 1 to (length of numList)
                    set a to item i of numList
                    copy (item a of customer) to the end of nomDuFichier
          end repeat
          return nomDuFichier
end nomFichier
--Position d'un élément dans une lste
on posElmList(partChoix, custInfo)
  activate
          set elmChoix to 0
          set numList to {}
          repeat with i from 1 to (length of custInfo)
                    set elmChoix to elmChoix + 1
                    repeat with j from 1 to (length of partChoix)
                              if ((item j of partChoix) = (item i of custInfo)) then
                                        copy elmChoix to the end of numList
                              end if
                    end repeat
          end repeat
          return numList
end posElmList
--Modifier un document Word
--remplacer des mots dans un texte
on wordTxtModif(myFilenameWord, customer, custInfo, nomDuFichier)
          tell application "Microsoft Word" --
  activate
  open myFilenameWord
                    set findrange to find object of selection -- ???
                    repeat with i from 1 to (length of custInfo)
                              tell findrange --replacement of the bookmark
  execute find find text (item i of custInfo) replace with (item i of customer) replace replace all
                              end tell
                    end repeat
  --display dialog nomDuFichier as string
  save as active document file name (nomDuFichier & ".pdf") file format format PDF
  close window 1 saving no
          end tell
end wordTxtModif
--Chargement des valeurs Excel dans une liste
--Ammélioration : trouver startCell et endCell automatiquement
on excelTxtExtract(startCell, endCell)
          tell application "Microsoft Excel" -- Load values from Excel
  activate
                    set myFilenameExcel to choose file with prompt "Please select an Excel workbook file:"
  open myFilenameExcel
                    set nameworksheet to get name of every worksheet
                    set myWorksheet to choose from list nameworksheet default items (item 1 of nameworksheet) with prompt "Choose a worksheet where the data are in the list:"
  activate object worksheet (result as string)
                    set myMatrix to value of range (startCell & ":" & endCell)
                    return (myMatrix)
          end tell
end excelTxtExtract
--Trouver automatiquement les Mots clés à remplacer dans le texte
--lineChosen est la ligne que l'on veut lire
on findInfo(myMatrix, lineChosen)
  activate
          set custInfo to {}
          set selectLine to (item lineChosen of myMatrix)
          repeat with i from 1 to (length of selectLine)
                    set custInfo to custInfo & (item i of selectLine)
          end repeat
          return custInfo
end findInfo

Hi kathyv30365453,
You can convert PDF to Word using either  the ExportPDF online service, or Acrobat. I checked your account, and it doesn't look like you've purchased an ExportPDF subscription. If you want to give Acrobat a try, you're welcome to download a 30-day trial from the link I reference above. In Acrobat, you choose File > Save as Other > Microsoft Word > Word Document.
Best,
Sara

Similar Messages

  • I want to save a converted PDF (via your cloud product) onto my desktop.  I want a hardcopy on my drive and not a link via Chrome to your cloud.  How do I do this?

    I want to save a converted PDF (via your cloud product) onto my desktop.  I want a hardcopy on my drive and not a link via Chrome to your cloud.  How do I do this?

    Hi WalterFranco,
    When you convert your files using ExportPDF or Adobe PDF Pack, files are automatically saved to your online account. But, you can log on to your account at https://cloud.acrobat.com/files, select the file that you want to store on your hard disk, and then click the Download link at the top of the file list.
    Please let us know how it goes.
    Best,
    Sara

  • Trying to converting fillable word documents to fillable pdf-when opening in Reader, no longer fillable

    I am converting fillable word documents (set up as tables with protection activated) into fillable pdf forms using LiveCycle but am having problems once I try to open them in Adobe Reader 9.2. I am unable to save the pdf as dynamic (the only option is static). They are no longer fillable and show "You are viewing this document in PDF/A mode".  Any advise...what am I doing wrong?

    Hi,
    I have the same problem.
    I check my settings and I don't ask a PDF/A files. It's a PDF standard.
    Have someone a solution ?
    Thanks a lot for your help
    Arnaud

  • How do convert a Word document to a PDF on an iMac running 10.6.8?

    How do I convert a Word Document to a pdf file on my iMac running OS X 10.6.8?

    File- Print-Print PDF- Save as PDF

  • I signed up for a free trial.  I want to convert a Word document to a PDF document.  I've signed in and been through the process a dozen times.  It doesn't work.

    I signed up for a free trial.  I want to convert a Word document to a PDF document.  I've signed in and been through the process a dozen times.  It doesn't work.

    Hi kemtnilion,
    What did you get a trial of? Adobe doesn't offer free trials of the Acrobat.com online services; did you get a free trial of Acrobat, perhaps? If so, you can save a PDF directly to Word from Acrobat, by choosing File > Save as Other > Microsoft Word > Word Document.
    Please let us know if you have additional questions.
    Best,
    Sara

  • Convert Multiple Word Documents to Multiple PDFs

    Hi, I'm looking for a way to convert multiple word documents into PDF files. I'm running Adobe Acrobat 3D Version 8.1.2. It seems as if going to Advanced > Document Processing > Batch Processing and then using the Print All sequence will allow this to happen, but when I have selected the word documents I want to turn into PDFs, after I click "Run Sequence" I get a message in the progress window saying "Starting the application in which the file was created..." then Acrobat shuts down and nothing happens. Does anybody have any ideas as to why this is happening?
    Thanks!

    Hi "jhaystead",
    Apologies for making an incorrect suggestion. "Batch Conversion" is a feature in Acrobat 9 and above.
    I'd suggest you use the "Open All" sequence > Double-click it to EDIT > For "2. Run Command On:" choose "Selected Folder" and BROWSE to the input folder. Similarly for "3. Select Output Location", you can choose "Same Folder as Original(s)", click OK and then "Run Sequence".
    This would invoke the PDFMaker for conversion of Word documents to PDF and save the output PDF(s) at the folder mentioned, instead of printing and prompting to save the output each time Adobe PDF Printer is called.
    Plus, could you please check if the Adobe PDF toolbar/menu options are there in Word and working fine?
    When you said,
    "The only way I can get PDFs produced is to manually open each word document, then save it as a PDF. I haven't had any luck with multiple PDF creation." Were you printing the Word documents to Adobe PDF Printer or using the PDFMaker options?
    Thanks!

  • How do I convert a word document into a pdf and then upload it to a web site

    How do I convert a word document into a pdf and then upload it to a web site so people can read it from my
    site with Dreamweaver 4?. How can I do this? Can anyone please help? I'm only a newbie. Thanking you in anticipation.

    First you need to install a means of printing to pdf from word.  I like cutepdf writer ( http://cutepdf.com/Products/CutePDF/writer.asp ).  Once installed you will print the doc in word and under the printer selection you choose pdf.
    Once you have the file you put it in your local site folders and upload it using Dreamweaver.  Be sure to link to it from a page so users can get to it and I would recommend giving the link a target of _black so it will open in a new window (see the properties inspector in DW).

  • Convert a word document to multiple PDF documents

    Hello
    I would like to convert a word document to multiple PDF documents. (i.e. convert 20 page word document into 20 single page PDF's). Is it possible to do this easliy and quickly.
    I have used word mail merge to create multiple cover letters in word
    I would now like to convert each cover letter (which is 1 page each) into individialized PDF's so that I can email them out as attachments
    I currently have been copying and pasting from my master word document into a fresh word document (one page at a time) then, saving, then converting to PDF one cover letter at a time. Although this works it is time consuming and I figured there may be an easier quicker way to do this
    Any thoughts, suggesstions, would be greatly appreciated
    Thanks

    It is possible to convert the word document into a PDF then while the PDF is open do:
    Document
    Extract Pages
    1-20
    Check "Extract pages as seperate files"
    This will give you 20 seperate files.
    Hope it helps!

  • How do I access Adobe from Word to convert a word document to pdf?

    How to I access an Adobe command in Word to convert a Word document to pdf?

    Certain versions of Word will have an Adobe PDF menu in the ribbon, which allows you to convert the Word file you're viewing to a PDF directly, maintaining all the links, bookmarks, destinations, etc. in it.
    The other option is to use the PDF Printer and print the Word document to a PDF. This will result in a "flat" copy of the file, without any of the meta-elements described above. Basically the same as printing it out, only you use a virtual printer that generates a PDF file.

  • How do I convert a word document to a PDF?

    help me

    Hi jzpartners,
    I checked your account and see that you have an ExportPDF subscription (and an expired Adobe PDF Pack subscription). It's PDF Pack (or Acrobat) that lets you convert a Word document to PDF. Please see Using Adobe PDF Pack.
    If you want to create PDF files, you can either restart your ExportPDF subscription, or try Acrobat (www.adobe.com/products/acrobat.html).
    Best,
    Sara

  • How do I convert a word document to a pdf document that is protected

    How do I convert a word document to a pdf document that is protected

    Use Acrobat, or possibly CreatePDF.

  • How to convert a word document to a fillable pdf form

    hello -
    how to I convert a word document into a fillable pdf form?

    Hi carolynm68845256
    Please browse this link for detailed instructions regarding your issue: Acrobat Help | Creating and distributing PDF forms
    Let me know if you face any challenges or if you have any other query.
    Regards,
    Rahul

  • I just renewed my subscription to convert a Word document to a pdf.  Your sales department told me there was a hold up in confirming the purchase.  I need to do the conversion now.  In fact, if it had worked, I would be done now.

    I just renewed my subscription to convert a Word document to a pdf.  Your sales department told me there was a hold up in confirming the purchase.  I need to do the conversion now.  In fact, if it had worked, I would be done now.
    [private information removed by moderator]

    Hi bobbij,
    I'm sorry to hear there was a holdup with your order. Have you been able to access your subscription yet? If not, and you're on a time crunch, you could get the job down with Acrobat. You can download a free 30-day trial from http://www.adobe.com/products/acrobat.html.
    Best,
    Sara

  • How to I convert a Word document to a PDF document?

    Please I have checked but did not find good free software tools to convert from word to pdf. Kindly suggest some good tools.

    This is the ADobe forum and they do not have free tools to convert a Word document to a PDF. Have you tried doing a search on Google?

  • How can I convert a Word Document to a PDF Document. The word document is already on my Pc

    How can I convert a Word Document already on my PC, to a PDF Document

    Using
    Adobe PDF Pack
    Adobe Acrobat
    Microsoft Word 2007+

Maybe you are looking for

  • Xorg not working with NVidia card on laptop.

    Hi, I'm new here, but have been using other distros for a while now. My problem is that whenever i try to use the discrete graphics Xorg freezes and the logs say something about not having a valid display for the card. The Intel graphics work fine fo

  • Help me with flash player!

    my falsh player does not automatically update for some reason-recently when I have tried to manually update it I have no sucess even though I see a message page from Adobe saying that flash player has successfully been updated it still will not run!

  • Why won't my image appear?

    Hi I have just created a website, have just uploaded it to the web and want to make a facebook link.  I have read all the facebook info about og and have debugged and made a gazillion alterations to my html page and reloaded it but for the life of me

  • Emailing results of a SQL Query....

    I am new to Oracle and was wondering if there is a way to create an email task that could be used to email results of a sql query. My query returns emails addresses that meet a specified criteria. I want to use an email task that takes these addresse

  • SMTP Server (port 25) issues on iPhone - IOS 4.1, 4.2.1

    SMTP Server Issues ios on iPhone 4.1 / ios 4.2.1 I use an IMAP email account Administered by my company ( I'am administrator in linux/freebsd, etc) and i have it set-up on my iPhone 4 (factory unlocked and NOT jailbreak). The incoming mail server wor