Share via


Increase the size of diagnostic logs for Office

Diagnostic logging is always on in all supported versions of Microsoft Office applications, By default, the process stores about 120 MB of log data per application. If you need to collect more log data to troubleshoot an issue, you can increase the default size of the log data that's stored.

To increase the size of Office diagnostic logs, follow these steps:

  1. Download OfficeDiagnosticLogging.zip, and save the file to a location that's easy to access by using a command prompt.

  2. Unzip the compressed file.

  3. Open a Command Prompt window. At the command prompt, locate the folder where you extracted the OfficeDiagnosticLogging.bat script.

  4. Close all instances of the Office application that you're troubleshooting.

  5. Run the following command:

    OfficeDiagnosticLogging.bat start -MaxSizeIn100MB 4
    

    Note

    This command limits Office to collecting no more than 400 MB of log data per application. You can change the numeral 4 in the command to another value that's appropriate for your available disk space and logging needs.

  6. Open the Office application, and use it as usual. After the random issue is reproduced, go to the next step.

  7. Close the windows of all Office applications that experienced the issue. This action forces all log data to be flushed to disk.

  8. Go to the %temp%\diagnostics folder, and open the corresponding folder for the Office application, such as WINWORD, EXCEL, or POWERPNT.

  9. There might be more than one .log file to collect. Sort the .log files by the modified date, and collect all .log files that have a Date modified time from one hour before the issue's occurrence up to (and including) the most recent .log file. Compress all collected .log files into a .zip archive file to send to Microsoft Support.