Issue with Excel links to .doc format Word documents

J. Stephen 20 Reputation points
2026-09-30T16:00:55.1066667+00:00

Hey all. I came across an issue where I have a user that is on Office 2019 16.0.10417.20208, and we have an Excel spreadsheet that contains links to Word documents. During testing, I found that if those Word documents had just text, the links would open them, but once pictures were added, it would have an error that said "There is not enough memory or disk space to display or print the picture". I went through all the steps I found online about trusted locations and UNC paths vs relative and clearing temporary files and protected view and none of them worked. What I DID find was that the Word documents are all in 97-2003 (.doc) format. I saved one file to .docx and updated the link in Excel and boom, it opened with no problem. My problem now is....I have 145 of those Word documents that would have to be converted over. Is there another way around this where I dont have to open and save each one as .docx?

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

Answer accepted by question author
Jay1 Tran 1,460 Reputation points Independent Advisor
2026-09-30T16:49:46.26+00:00

Hi Stephen,

Thank you for reaching out.Your testing points to the older Word 97–2003 .doc format as the source of the problem, rather than the Excel hyperlink itself. Since the same document opens correctly after being saved as .docx, converting the files in bulk is the most practical workaround. You do not need to open and save all 145 documents manually.

  1. Back up the document folder

Before converting anything, make a copy of the folder containing the .doc files. The macro below creates new .docx files and leaves the original .doc files unchanged, but having a backup is still recommended.

If any of the .doc files contain macros, they should be reviewed separately because the standard .docx format does not retain VBA macros.

  1. Run a batch-conversion macro in Word

In Word:

  • Open a blank document in Word.
  • Press Alt + F11.
  • Select Insert > Module.
  • Paste the following macro:
Sub BatchConvertDocToDocx()
    Dim folderPath As String
    Dim sourceFile As String
    Dim targetFile As String
    Dim fileName As String
    Dim wordDoc As Document
    Dim fileSystem As Object
    Dim convertedCount As Long
    Dim skippedCount As Long
    Dim failedCount As Long
    Dim failedFiles As String
    Set fileSystem = CreateObject("Scripting.FileSystemObject")
    With Application.FileDialog(msoFileDialogFolderPicker)
        .Title = "Select the folder containing the DOC files"
        If .Show <> -1 Then
            MsgBox "No folder was selected.", vbInformation
            Exit Sub
        End If
        folderPath = .SelectedItems(1)
        If Right(folderPath, 1) <> "\" Then
            folderPath = folderPath & "\"
        End If
    End With
    Application.ScreenUpdating = False
    Application.DisplayAlerts = wdAlertsNone
    fileName = Dir(folderPath & "*.doc")
    Do While fileName <> ""
        sourceFile = folderPath & fileName
        targetFile = folderPath & _
            fileSystem.GetBaseName(fileName) & ".docx"
        On Error GoTo ConversionError
        If Not fileSystem.FileExists(targetFile) Then
            Set wordDoc = Documents.Open( _
                FileName:=sourceFile, _
                ConfirmConversions:=False, _
                ReadOnly:=True, _
                AddToRecentFiles:=False, _
                Visible:=False)
            wordDoc.SaveAs2 _
                FileName:=targetFile, _
                FileFormat:=wdFormatDocumentDefault, _
                AddToRecentFiles:=False
            wordDoc.Close SaveChanges:=False
            Set wordDoc = Nothing
            convertedCount = convertedCount + 1
        Else
            skippedCount = skippedCount + 1
        End If
ContinueLoop:
        On Error GoTo 0
        fileName = Dir()
    Loop
    Application.DisplayAlerts = wdAlertsAll
    Application.ScreenUpdating = True
    MsgBox convertedCount & " file(s) converted." & vbCrLf & _
           skippedCount & " file(s) skipped." & vbCrLf & _
           failedCount & " file(s) failed." & _
           IIf(failedFiles <> "", vbCrLf & vbCrLf & _
           "Failed files:" & vbCrLf & failedFiles, ""), _
           vbInformation, "Conversion complete"
    Exit Sub
ConversionError:
    failedCount = failedCount + 1
    failedFiles = failedFiles & fileName & _
        " - Error " & Err.Number & ": " & Err.Description & vbCrLf
    If Not wordDoc Is Nothing Then
        wordDoc.Close SaveChanges:=False
        Set wordDoc = Nothing
    End If
    Err.Clear
    Resume ContinueLoop
End Sub
  • Place the cursor inside the macro.
  • Press F5.
  • Select the folder containing the 145 .doc files.
  1. Update the Excel Links
  • After conversion, the Excel hyperlinks must point to the new .docx files rather than the original .doc files. If the links are normal worksheet hyperlinks, they can also be updated in bulk with an Excel macro.
  • Save a backup copy of the workbook first, then run this macro from Excel using Alt + F11 > Insert > Module.
  • Paste the following macro:
Sub UpdateDocLinksAndDisplayText()

    Dim ws As Worksheet
    Dim link As Hyperlink
    Dim oldAddress As String
    Dim oldText As String
    Dim updatedCount As Long

    For Each ws In ThisWorkbook.Worksheets
        For Each link In ws.Hyperlinks

            oldAddress = link.Address

            If LCase(Right(oldAddress, 4)) = ".doc" Then

                link.Address = Left(oldAddress, Len(oldAddress) - 4) & ".docx"

                If link.Type = msoHyperlinkRange Then
                    oldText = link.Range.Text

                    If LCase(Right(oldText, 4)) = ".doc" Then
                        link.TextToDisplay = _
                            Left(oldText, Len(oldText) - 4) & ".docx"
                    End If
                End If

                updatedCount = updatedCount + 1

            End If

        Next link
    Next ws

    MsgBox updatedCount & _
        " hyperlink(s) updated successfully.", _
        vbInformation, "Update complete"

End Sub


  • Place the cursor inside the macro.
  • Press F5.
  • Right-click each link and select Edit Hyperlink.
  • Confirm that the paths now end in .docx.
  • Click each link and verify that the correct converted document opens.

I hope your issue gets resolved soon. Any updates would be greatly appreciated.

Was this answer helpful?

1 person found this answer helpful.

1 additional answer

Sort by: Oldest
  1. J. Stephen 20 Reputation points
    2026-10-02T16:53:07.2833333+00:00

    Hey Thank you for the help. We were able to get it to work.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.