View Single Post
 
Old 07-16-2019, 06:12 AM
raphael75 raphael75 is offline Windows 10 Office 2016
Novice
 
Join Date: Jul 2019
Posts: 2
raphael75 is on a distinguished road
Default

It turned out the issue was PHPWord was saving the documents in Word2007 format in compatibility mode. I had to modify the macro to save the documents in docx format and remove compatibility mode, and then I was able to modify the title attribute.

Code:
wdDoc.SaveAs2 FileName:=path & fname, FileFormat:=wdFormatDocumentDefault, CompatibilityMode:=wdWord2013
then

Code:
For Each sh In wdDoc.ActiveWindow.Document.InlineShapes

sh.Title = url

Next sh
That fixed it.
Reply With Quote