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

  • HT3986 i get a black screen during windows 7 installation on bootcamp 5.0.1

    i get a black screen during windows 7 installation on bootcamp 5.0.1 , it wont install

  • Safari Crashes on Startup

    Safari started crashing all the time each time it starts. I think a Java update was installed and the safari problem. Started Macbook Pro in safe mode and disabled extensions but Safari still crashes. I am running OSX Mavericks on MacBook Pro 2011. A

  • Migrate from PS Album SE 3.2 to PS Elements 9?

    Hello everybody. I've been using Adobe PhotoShop Album SE 3.2 to import and organize the pictures taken with my iPhone 3Gs. Then I changed my iPhone 3Gs with the new iPhone 4 and suddenly PS Album 3.2 stopped working and it didn't import pictures any

  • Invoices that were on hold;

    Hi, How should i get below information.Plz help me... invoices that were on hold; and had been manually released from hold, validated (ready to be picked up by payment batch runs) but not yet paid in a period

  • Calling ABAP Extracts into XI

    Calling ABAP Extracts into XI What is my understanding for the above scenario will be follows 1. Build the ABAP extract (basically SQL from what I understand).  This SQL dictates the structure for master table. 2. Build a BAPI wrapper around the extr