alexransome
Board Regular
- Joined
- Jun 10, 2011
- Messages
- 192
Hello,
I have a sheet that has data in the cells and that data is linked to areas in a word document.
I'd like to break the link just before the word doc is saved so that the data doesn't update when opening next. The next person to open the word document will not want to see a dialog box asking to update the links (my boss!!!)
This is my code so far ...
Thanks for any assistance and help.
I have a sheet that has data in the cells and that data is linked to areas in a word document.
I'd like to break the link just before the word doc is saved so that the data doesn't update when opening next. The next person to open the word document will not want to see a dialog box asking to update the links (my boss!!!)
This is my code so far ...
VBA Code:
'Open Word and view the VAF-MASTER file
Set wordapp = CreateObject("word.Application")
wordapp.Documents.Open "\\FileLocation\FileName.docx"
wordapp.Visible = True
'Break Excel links in the doc
With ActiveDocument.Fields.Unlink
'Auto save
wordapp.ActiveDocument.SaveAs "\\FileLocation\FileName-" & Sheets("eMail").Range("E16")
Thanks for any assistance and help.