#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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] |
Tags |
insert at the end, insert file, macros |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Align...both left and right? | supersimu | Word | 1 | 01-25-2014 02:05 AM |
How to right align section numbers in TOC? | Dr Wu | Word | 1 | 01-03-2014 02:07 PM |
VBA code to align watermarks | Catty | Word VBA | 8 | 11-21-2013 01:35 AM |
Resize and align | AndyDDUK | PowerPoint | 9 | 11-09-2012 05:23 AM |
align & justify the whole document | PKTEE | Word | 6 | 08-16-2009 08:54 PM |