How to to automatically update Word links with Mail Merge, when opening Word file from Excel?
I have used the “Mail Merge” to link excel cells to word document. Whenever I open the word document with Mail Merge, a box is opened and when I say “yes”, all the links are updated. I have written following macro in the Excel file to open word document from Excel and do some modifications on it.
My problem is that when I open the word document from Excel , this box is not displayed and the Excel links are not updated in the Word document. Can you guide me how can I modify this macro to automatically update Word links when opening the Word document?
Sub OpenWord()
Dim oAPP As Object
Set oAPP = CreateObject(Class:="Word.Application")
oAPP.Visible = True
oAPP.Documents.Open Filename:="D:\kalantari\valuation\contract.templat e\word\mail02.docm"
oAPP.Visible = True
oAPP.Run "macro4"
oAPP.Run "unlinkheader"
End Sub
Last edited by soroush.kalantari; 05-23-2023 at 05:18 AM.
|