View Single Post
 
Old 08-14-2013, 12:08 AM
anandyrh anandyrh is offline Windows 7 32bit Office 2010 32bit
Novice
 
Join Date: Aug 2013
Posts: 2
anandyrh is on a distinguished road
Default

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
Reply With Quote