+ Reply to Thread
Results 1 to 4 of 4

Run-time error 1004 Document not saved....

  1. #1
    Registered User
    Join Date
    05-19-2014
    Location
    UK
    MS-Off Ver
    Standard 2016
    Posts
    15

    Run-time error 1004 Document not saved....

    Hi all,

    I am running the Macro below to export to pdf a document.

    It has worked perfectly for over a week up until today and I am not sure why I am now getting the error message. It appears that it wont save the pdf at all as the pdf file does not get created or shown on screen.

    My complete macro is actually three modules, copy data to another excel sheet, print sheet and then export copy to pdf. Code as follows:

    Module 1
    Please Login or Register  to view this content.
    Module 2
    Please Login or Register  to view this content.
    Module 3

    Please Login or Register  to view this content.
    Module 4

    Please Login or Register  to view this content.

    The error message I get today is Run-time error 1004: Document not saved. The document may be open, or an error may have been encountered when saving.

    Please could somebody offer me an explanation as to why this has suddenly started happening and how I may be able to go about fixing it? I suspect the pdf engine is running in the background but looking at active processes I can see only the adobe update which as it happens doesnt appear to show an update is in progress.

    Thank you for any help.

    Thank you
    Attached Images Attached Images

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,893

    Re: Run-time error 1004 Document not saved....

    When you get the error message and click on debug, which line of code is highlighted?
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    05-19-2014
    Location
    UK
    MS-Off Ver
    Standard 2016
    Posts
    15

    Re: Run-time error 1004 Document not saved....

    Hello,

    Thank you for your reply. Unfortunately Debug is greyed out on the error message therefore I only get the option to click end (or help which wasnt helpful). This again makes me think it is an issue opening the pdf software.

  4. #4
    Registered User
    Join Date
    05-19-2014
    Location
    UK
    MS-Off Ver
    Standard 2016
    Posts
    15

    Re: Run-time error 1004 Document not saved....

    Quick update. The code appears to be working on my machine but not on the persons who uses the spreadsheet daily. It must be related to the pdf converter. Can anyone confirm that using my code above this is built into Excel therefore suggesting an Excel problem?

    The pdf used to open to the default read software being Adobe Reader. Could this be causing the problem but I cannot see if open? Is there a code amendment that will force close any open pdf reader before processing the save and open file?

    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Run-time error '1004': Document Not Saved (while using LockXLS)
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-25-2013, 12:14 PM
  2. Document not saved error
    By firefly2k8 in forum Excel General
    Replies: 0
    Last Post: 02-01-2011, 12:37 PM
  3. Excel 2007 : Run Time Error 1004 - Document not saved
    By Villamankh in forum Excel General
    Replies: 2
    Last Post: 12-17-2010, 09:44 AM
  4. [SOLVED] Run-time error '1004'; Document not saved - intermittent
    By Kerry in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-15-2005, 07:15 PM
  5. [SOLVED] 'Document not saved' error
    By Optiglaze in forum Excel General
    Replies: 0
    Last Post: 08-03-2005, 04:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1