|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
You can suppress the message -see the Word macro to toggle the registry setting at Word VBA examples. However I doubt that this will affect the issue. See the macro suggested at Update linked fields in Word document from Excel VBA - Stack Overflow to address that.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
link, mail merge, update |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Excel to Word - mail merge Birthday field takes ap to a month to update. | bobinmil | Mail Merge | 0 | 09-26-2021 10:16 AM |
Links from word to excel not updating automatically | PWindsor | Word | 1 | 02-17-2019 01:36 PM |
Update & Unlink Specific Merge Field in Word Doc from Mail Merge - Excel VBA | RMerckling | Mail Merge | 16 | 05-17-2018 05:19 PM |
Word updating Excel links automatically | Bob Loblaw | Word | 0 | 02-11-2015 06:26 AM |
Can Word automatically do "Finish and Merge" after opening file? | DaveBF | Mail Merge | 1 | 09-14-2011 07:56 AM |