Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-12-2017, 04:19 PM
macropod's Avatar
macropod macropod is offline Rename a VBA imported picture Windows 7 64bit Rename a VBA imported picture Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,471
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use something like:
Code:
Dim ImPath1 As String, Shp As Shape
ImPath1 = "C:\Users\nivo\Pictures\Icons\Water_icon_square.jpg"
Set Shp = ActiveDocument.Shapes.AddPicture(FileName:=ImPath1, LinkToFile:=False, SaveWithDocument:=True, _
          Left:=-15, Top:=275, Anchor:=Selection.Range, Width:=40, Height:=40)
Shp.Name = Split(Split(ImPath1, "\")(UBound(Split(ImPath1, "\"))), ".")(0)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rename a VBA imported picture Picture content control -> insert picture -> empty? Jaymond Flurrie Word 3 07-13-2016 07:00 AM
Rename a VBA imported picture Convert an imported chart (picture) to an editable drawing object fishguy Drawing and Graphics 1 05-23-2016 02:23 AM
Rename Files gsrikanth Excel Programming 3 05-14-2012 03:03 AM
Move Picture by picture name, rename picture by picture name CatMan PowerPoint 2 04-18-2012 12:21 PM
Powerpoint automatically changing picture size when adding a picture (2010) One_Life PowerPoint 7 01-20-2012 06:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:31 AM.


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