SOLUTION to Dreamweaver problem: The document you selected is very large and would take too long to import

Question. I’m trying to paste a large Word document (or even copied web pages out of Firefox) into Dreamweaver and I get the following error:

“The document you selected is very large and would take too long to import. We recommend you use Copy and Paste to insert parts of the document into multiple web pages.”

Answer. Edit the Dreamweaver file InsertOfficeDoc.js to adjust the file size threshold upwards. After editing that file and restarting Dreamweaver, you should be able to paste your document!

Detailed solution:

Edit the following file, the full path should be something similar to this:

C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration\Commands\InsertOfficeDoc.js

(for CS3)

-or-

C:\Program Files\Adobe\Adobe Dreamweaver CS4\configuration\Commands\InsertOfficeDoc.js

(for CS4)

When you open those files in a text editor (or Dreamweaver itself) you will need to adjust the following two variables:

————————

// The threshold where we should warn the user they are importing a big file

16 MM.od_WarnThreshold = 100000;

// The threshold where we should not allow the user to import the file.

20 MM.od_MaxThreshold = 200000;

————————

I changed both those variable to a larger number, adding a zero at the end. So afterward it looks like:

————————

// The threshold where we should warn the user they are importing a big file

16 MM.od_WarnThreshold = 1000000;

// The threshold where we should not allow the user to import the file.

20 MM.od_MaxThreshold = 2000000;

————————

I hope this helps you as much as it did me, it sure made my work a lot easier because I could finally paste  those large document! 🙂

Source: original solution found in a comment by paPus on the following post Just a Zilch: Another Reason to Abhor Dreamweaver

29 comments

  • Greg Thorson

    Thank you! I only use Dreamweaver when there is absolutely no other reasonable way to crank out an html document… and that’s a bad time to be stuck.

    Another tip: accept all comments and revisions on the word document first, if practical. Sometimes they get picked up for some reason, even if they’re hidden. That greatly bulks up the document.

  • J.D.

    Thanks for the excellent tip Greg!

  • I`ve been looking for this for a long time, thank you so much .o/

    Cheers

  • Luisa

    Fantastic!
    Thanks!!

  • Luis Ortiz

    Hey!

    Great adviced! , you just forgot to say that in order the rpogram allow you to save the new file, you must open dreamweaver as “administrator” and there open the InsertOfficeDoc.js, I was trying to save it and it was not possible until I close DW and open again as administrator.

    Thanks

    Luis

  • chloe

    I’m using the portable version of macromedia and having the same problem. any advice on how to get around it with the portable version?

  • JP

    Thanks… Great solution and works superb… 🙂

  • Pib

    How did you guys save the file? I keep getting a denied error after I try to save the corrected file.

    • Dear Pib,
      Thank you for your comment.

      I do not recall getting an access denied error like that. However, here are a few things you may want to try:
      #1 Make sure Dreamweaver is not running when you save the modified .js file.
      #2 If using Notepad to make the changes, then try starting Notepad as Administrator. This can be done by “Right clicking” on the Notepad start menu entry then choosing “Run as Administrator”. Sometimes opening Notepad in this manner will then allow you to open/edit/save files that otherwise would be denied.

      I hope this suggestions help! Please keep us posted 🙂

      Best regards,
      -JD

  • RH

    Another method of saving the revised file if access is denied (on Windows 7, here):
    (Tip: Close DW before making a change to the .js, so that the .js file can’t be in use.)

    1) In Windows Explorer, right-click the file, select Properties
    2) Select the Security tab
    3) Under “Groups or user names” make sure that each name listed has Full control. If not, click Edit, then select the name (likely “Users”), then next to “Full control” select the checkbox “Allow”.
    4) Click OK then OK (i.e., click OK to accept and close each open window of this step).

  • RH

    My pleasure, and thank you as well for posting this work-around in the first place! Saved me (potentially) HOURS!

  • Excellent! Thank you so much! Worked perfectly.

  • I hope this thread is still active.

    It seems this fix is for CS versions of Dreamweaver. I am using Dreamweaver 8 and my .js file does not have the MM.od_WarnThreshold or MM.od_MaxThreshold lines. My .js file looks like this:
    //
    // Copyright 2000, 2001, 2002, 2003, 2004, 2005 Macromedia, Inc. All rights reserved.
    // —————————————————-
    //
    // Insert_Word.js

    function canAcceptCommand()
    {
    return (dw.getDocumentDOM() != null && dw.getFocus() == ‘document’ && dw.getDocumentDOM().getParseMode() == ‘html’ && dw.canImportWord() > 0);
    }

    function go()
    {
    var fName = dw.getWordDocument();
    if ( fName != null && fName.length > 0 )
    insertOfficeDoc( fName, null, false, -1 );

    return “”;
    }

    Does anyone have any idea what needs to change to get version 8 to accept large .doc files? (The document I would like to get is 150+ pages with 8 columns each …. I really don’t want to have to re-type it into Dreamweaver.

    Thanks.

  • Please disregard earlier post. I wasn’t opening the correct file. DUH. Sorry.

  • It’s the very first time i leave a comment on a blog.. but i just had to! This post literally saved me many hours of extra work!!! Thank you! Greetings from Greece

  • nekcih

    Super helpful! Thank you! This fix allowed me to copy/paste large tables from the web into Dreamweaver.

    On OS X with CS6, this file is located at /Applications/Adobe Dreamweaver CS6/Configuration/Commands/

    • Hi Nekcih,
      Thank you for your nice comment. I am very glad that this tip was helpful for you, and thanks for the additional info about OSX and Dreamweaver CS6! 🙂

      Best regards,
      -JD

  • Nick

    I spent half a day trying to paste in various ways and having no success, just because I had added one line to my spreadsheet.
    Eventually found this tip and Bingo! I can import my spreadsheet again!
    Thanks you so much

  • xak2808

    Very helpful information, many thanks!

  • Gary

    I just had to say A BIG THANK YOU for sharing. That little bit of info got me going again.
    Best regards

    • Hi Gary,
      I am very happy that my page was helpful to you. Thanks for the nice comment and taking the time to comment! Have a great weekend. đź‘Ť

      Best regards,
      -J.D.

  • Nick

    Thanks for this article. Still works in the 2015 version! It’s kind of silly that Dreamweaver blocks you from doing this after the warning, but I’m glad that there’s a workaround.

    • Hi Nick,
      Thank you for your comment. That is crazy that the problem still persists in DW 2015, but I am glad the tip still works 🙂

      Thanks again for the info and have a great week!
      -J.D.

  • hen3ry

    Great fix!

    One quibble: you do NOT want to be meddling with files inside DW’s application, not when there’s a better alternative.

    For MacOS, this procedure is much safer:

    1. Quit DW

    2. Locate the file “InsertOfficeDoc.js” as described, adjusting for the specific version you are using, and make a copy, say, on the desktop.

    3. Locate the folder “~/LibraryApplication Support/Adobe/Dreamweaver /en_US/Configuration”. Does a folder “Commands” exist there?

    —If not, create one, and open it.

    —If so, open it.

    4. Move the copied file “InsertOfficeDoc.js” to that “Commands” folder, edit it as suggested, and save. You should not have any permissions difficulties, as you own this copied file and everything else in your home folder.

    5. Launch DW and try your paste operation again. The new larger limit you set should be in effect.

    This works because of a feature that’s been baked in to DW for a long time: any command file in the user’s home folder overrides a command file of the same name in the DW application folder. You don’t have to risk the integrity of your application.

    HTH

Leave a Reply to J.D. H. Cancel reply

Your email address will not be published. Required fields are marked *