I wrote this code to insert a image based on value of Category document property.
Quote:
Category = ActiveDocument.BuiltInDocumentProperties("Category ")
With ActiveDocument
If Category = "IT" Then
Selection.InlineShapes.AddPicture FileName:= _
"C:\Users\user\Documents\testing.jpg", LinkToFile:= _
False, SaveWithDocument:=True
End If
End With
|
Regards,
Anand