Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-17-2023, 08:57 PM
soroush.kalantari soroush.kalantari is offline How to assign a macro to a picture in Word? Windows 10 How to assign a macro to a picture in Word? Office 2016
Competent Performer
How to assign a macro to a picture in Word?
 
Join Date: Jun 2021
Posts: 115
soroush.kalantari is on a distinguished road
Default How to assign a macro to a picture in Word?


I want to learn how to assign a macro to a picture in Microsoft Word. I have searched the internet and have been pointed to using “Macro button filed” and pasting the picture the macro is to be assigned to it, as its “display text” (see here. The second answer).
But when I do this process, it fails to do the job for me. (When I right click on the field and choose “toggle fields codes and “{}” disappear and just the picture remains, I see nothing is assigned to the remaining picture . See the attached file in which I want to assign the “test” macro to the picture.). Can you guides me on this issue?
Attached Files
File Type: docm Assigining.macro.picture.docm (24.1 KB, 4 views)
Reply With Quote
  #2  
Old 09-18-2023, 01:16 AM
gmayor's Avatar
gmayor gmayor is offline How to assign a macro to a picture in Word? Windows 10 How to assign a macro to a picture in Word? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Insert an activeX button from the Developer tab. Call your macro from the button code and from the button's properties add the image - see attached
Attached Files
File Type: docm Assigining.macro.picture.docm (36.2 KB, 9 views)
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 09-18-2023, 08:17 PM
soroush.kalantari soroush.kalantari is offline How to assign a macro to a picture in Word? Windows 10 How to assign a macro to a picture in Word? Office 2016
Competent Performer
How to assign a macro to a picture in Word?
 
Join Date: Jun 2021
Posts: 115
soroush.kalantari is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
Insert an activeX button from the Developer tab. Call your macro from the button code and from the button's properties add the image - see attached
Thank you. Your answer solved my problem.
Reply With Quote
Reply

Tags
assigning macro, picture



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to assign a checkbox to run a macro in Word? KJenkins Word VBA 1 07-19-2021 03:36 PM
How to assign a macro to a picture in Word? Assign macro to word style TechWriter Word 3 01-07-2020 05:01 PM
How do you assign a macro to a button in Word? smog32 Word VBA 2 06-25-2019 01:42 AM
How to assign a macro to a picture in Word? Word macro - remove shading from active para. and assign language to it, keep text cursor position dejanm83 Word VBA 3 03-19-2017 02:36 PM
Assign Macro to Shape in Word 2013 tunes10590 Word VBA 8 01-29-2015 06:26 AM

Other Forums: Access Forums

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