HT2506 hi i can't seem to copy and paste pdf files from preview to a microsoft word document. it always comes up with nonsense characters in the word document. how do i fix this? thanks in advance

hi i can't seem to copy and paste pdf files from preview to a microsoft word document. it always comes up with nonsense characters in the word document. how do i fix this? thanks in advance

Hi,
The quickest way to do this (tested with OS 10.8.2, MS Word 2011) is in one line:
tell application "Microsoft Word" to close every document whose name begins with "book"
The reason why your script doesn't work is that you aren't specifying to Word which document you want it to close.
So, changing one line ought to do it:
close document incrementvalue -- instead of "close document"
But... when you close a document, you change the document count. Document 2 becomes document 1, document 3 becomes document 2 etc. So eventually you'd get a message saying "The object you are trying to access doesn't exist".
Because of this, if you want to do it in a repeat loop, you have to work backwards:
tell application "Microsoft Word"
  set doc_count to count documents
  repeat with x from doc_count to 1 by -1
  if name of document x begins with "book" then close document x
  end repeat
end tell
Hope this helps.

Similar Messages

Maybe you are looking for

  • Like operator for sharepoint ssrs

    Hi, i ve got a multiiple instructor coulmn like i ve written experssion like = Join(Parameters!Instructor.Label,",") Like "*" & Fields!InstructorName.Value  & "*" boolean value=true but Please see the below image it is displaying wrong instructor res

  • Need "test run" flag for change BAPI of fixed assets

    Hi Experts,       There will be 'Test Run Flag' in the Bapi.Please tell where it will be given with in the BAPI . For example, in 'BAPI_FIXEDASSET_CREAT'. Thanks, gsaasg. Edited by: Julius Bussche on Sep 5, 2009 11:28 PM Please use meaningfull subjec

  • .Mac mail gone crazy

    This morning I logged onto my .Mac email, logged in and it opened up but the entire format had changed (everything was moved to the left side "new mail", etc.) and the actual emails are appearing at the bottom of the page in an unusual format. I can'

  • Possible issue with external displays

    Ive been looking into why my latest and greatest g4 1.67 17" powerbook runs my copy of Aperture like a dog with 1 leg and i think it could be due to the external 23" display i use with this laptop. With that amount of screen, the GPU must have to all

  • Pending review 2 open CR

    hi All, i have uploaded the build to the appworld and its under review. the status is "pending review 2open CRs". how can i get that CR closed? i tried to see that but exactly for what i got the CR is not shown anywhere? how much time it would take f