Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-12-2017, 09:38 AM
jeffrogers jeffrogers is offline InsertImage to align with cursor Windows 8 InsertImage to align with cursor Office 2016
Novice
InsertImage to align with cursor
 
Join Date: Feb 2017
Posts: 1
jeffrogers is on a distinguished road
Thumbs down InsertImage to align with cursor

I am trying to write macros to add png files within text. Here is my current code:



Sub InsertImage()

Dim imagePath As String
imagePath = "C:\Uselesss\f15648a9e2f7185199568bec9.png"
ActiveDocument.Shapes.AddPicture FileName:=imagePath, _
LinkToFile:=False, _
SaveWithDocument:=True, _
Width:=14, _
Height:=14
End Sub

which adds the line on the same line as the cursor, but at the far left.
I have been trying to implement ConverttoInlineShape but I can't get it to work.

I am a very bad coder, so unless your answers show me the code that will fix it, or explain exactly what i have to add/remove/replace, I won't get much further.

Figured 6 hours on this was enough. Please Help!
Reply With Quote
  #2  
Old 02-12-2017, 05:43 PM
macropod's Avatar
macropod macropod is offline InsertImage to align with cursor Windows 7 64bit InsertImage to align with cursor Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Are you trying to insert the image as an inlineshape or with text wrapping?

See also: https://www.msofficeforums.com/word-...html#post47919
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
insert at the end, insert file, macros



Similar Threads
Thread Thread Starter Forum Replies Last Post
InsertImage to align with cursor Align...both left and right? supersimu Word 1 01-25-2014 02:05 AM
InsertImage to align with cursor How to right align section numbers in TOC? Dr Wu Word 1 01-03-2014 02:07 PM
InsertImage to align with cursor VBA code to align watermarks Catty Word VBA 8 11-21-2013 01:35 AM
InsertImage to align with cursor Resize and align AndyDDUK PowerPoint 9 11-09-2012 05:23 AM
InsertImage to align with cursor align & justify the whole document PKTEE Word 6 08-16-2009 08:54 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:01 PM.


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