Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-01-2017, 06:32 AM
Syasthe Syasthe is offline Insert specific picture and add specific Text to it Windows 10 Insert specific picture and add specific Text to it Office 2016
Novice
Insert specific picture and add specific Text to it
 
Join Date: Nov 2017
Posts: 1
Syasthe is on a distinguished road
Default Insert specific picture and add specific Text to it

Hello

I need a macro, which opens a folder, where I have my pictures. Then, depending on which picture I choose, it should insert a certain text. The pictures will be inserted in a table cell and the text should appear in the next table cell.

For better understanding, I need it to insert warning signs in manuals and the description of the warning signs. So the pictures and descriptions are always the same.



To open the Folder, I thought, something like this could work:

Code:
    Dim sPath As String
    Dim sPicPath As String
    Dim lRes As Long
    
    sPicPath = "C:\Temp"
    sPath = Options.DefaultFilePath(path:=wdPicturesPath)
    Options.DefaultFilePath(path:=wdPicturesPath) = sPicPath
    lRes = Application.Dialogs(wdDialogInsertPicture).Show
    Options.DefaultFilePath(path:=wdPicturesPath) = sPath
I found this code and it works, but I don't know how to continue. I'm new to VBA.

Thank you for your time
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge Rules - IF, OR Function to Insert Specific text larry11 Mail Merge 2 06-25-2017 06:15 AM
Insert Text with specific Font Size Nick70 PowerPoint 1 08-10-2016 09:56 AM
How to insert text at specific location as bold PRA007 Word VBA 7 01-05-2016 10:12 PM
Insert specific picture and add specific Text to it Macro to Insert text into the beginning on specific paragraphs unless the paragraph is blank caboy Word VBA 2 04-01-2015 07:00 AM
Insert specific picture and add specific Text to it how to create menu shortcut to insert specific picture msworddave Word 1 05-08-2013 02:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:46 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