Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2013, 05:27 AM
anandyrh anandyrh is offline Insert image based on document custom property Windows 7 32bit Insert image based on document custom property Office 2010 32bit
Novice
Insert image based on document custom property
 
Join Date: Aug 2013
Posts: 2
anandyrh is on a distinguished road
Default Insert image based on document custom property

Hi,

I am trying to write/record macro to insert an image based on the value of custom document property which I have created.

Here I am trying to create a cover page which will include document properties like Title, Keywords, Comments etc. So when a person adds this cover page it automatically adds the above fields. Similarly I wanted to insert an image in the cover page, but image will vary for documents. So I was thinking if it can be achieved by macro.

I am a newbie to macro, so any help would be really great to me

Regards,
Anand
Reply With Quote
  #2  
Old 08-14-2013, 12:08 AM
anandyrh anandyrh is offline Insert image based on document custom property Windows 7 32bit Insert image based on document custom property Office 2010 32bit
Novice
Insert image based on document custom property
 
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
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert image based on document custom property Default Custom Dictionary Based on Document PatrickYork Word 3 04-03-2015 11:19 PM
Insert image based on document custom property automatically insert an image into a document hanrattyc Word 1 05-13-2013 04:27 PM
Custom Document Property Lost From Template bhaughey Word 8 03-05-2013 02:11 PM
Link Watermark to custom property kerend Word 0 04-08-2012 05:03 AM
Insert image based on document custom property QuickParts - custom document property untttt Word 2 06-09-2011 05:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:23 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft