Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2022, 08:58 AM
Captn01 Captn01 is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Novice
Means to easily run Macro from BOTH Windows and MacOS
 
Join Date: Nov 2022
Posts: 6
Captn01 is on a distinguished road
Default Means to easily run Macro from BOTH Windows and MacOS

Hello!

I have a Macro that is already completed but I need a method to run the macro with something as simple as a click of a button from BOTH Windows and MacOS.



I originally had a button that could be clicked but Mac does not support activeX controls so the button does not work. I also tried mapping a hotkey but that does not translate over to Mac either... I thought of trying to figure out how to have the macro automatically run when text is pasted into the document but couldn't find a solution for that so I am kinda stuck... Short of having two different forms, one for MacOS and one for Windows, any ideas?
Reply With Quote
  #2  
Old 11-29-2022, 03:19 PM
Guessed's Avatar
Guessed Guessed is offline Means to easily run Macro from BOTH Windows and MacOS Windows 10 Means to easily run Macro from BOTH Windows and MacOS Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Does a MacroButton field work on a Mac?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 11-29-2022, 04:20 PM
Captn01 Captn01 is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Novice
Means to easily run Macro from BOTH Windows and MacOS
 
Join Date: Nov 2022
Posts: 6
Captn01 is on a distinguished road
Default

Macro buttons in Word for Windows use ActiveX, which does not work on MacOS... MacOS has it's own button option but that does not work on Windows.
Reply With Quote
  #4  
Old 11-29-2022, 06:15 PM
macropod's Avatar
macropod macropod is offline Means to easily run Macro from BOTH Windows and MacOS Windows 10 Means to easily run Macro from BOTH Windows and MacOS Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

MACRUTTON fields don't use ActiveX and are supported on Macs. See: Word for Mac 2016 - Picture in MacroButton field doesn't trigger macro
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-30-2022, 08:07 AM
Captn01 Captn01 is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Novice
Means to easily run Macro from BOTH Windows and MacOS
 
Join Date: Nov 2022
Posts: 6
Captn01 is on a distinguished road
Default

My apologies, the only button fields I am familiar with for Windows that can be used with a Macro on Word are the ActiveX buttons. I am not sure I am understanding the link you sent...

*EDIT: Nevermind! I figured this out. Thank you!
Reply With Quote
  #6  
Old 12-02-2022, 08:40 AM
Captn01 Captn01 is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Novice
Means to easily run Macro from BOTH Windows and MacOS
 
Join Date: Nov 2022
Posts: 6
Captn01 is on a distinguished road
Default

@Macropod

Hello! So, this is still not working on a Mac. I tried it with an image first (on a .doc since it would actually run the macro on Windows rather than just selecting the image) which did not work, then I tried it with just text on a both a .doc and .docm and it still does not run the macro on MacOS... I've had several of my Tech team try it as well, and it would not work on a Mac. I am going to remote into one of their devices (we are all remote employees) to take a look later today to see if I can figure out WHY it would not be working. But the idea is that it has to be super simple because it will be used by many users and they need to just be able to open it and double click without having to reconfigure anything on their end. (Each user DOES already have Macros enabled).
Reply With Quote
  #7  
Old 12-02-2022, 12:33 PM
macropod's Avatar
macropod macropod is offline Means to easily run Macro from BOTH Windows and MacOS Windows 10 Means to easily run Macro from BOTH Windows and MacOS Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Without actually seeing the problem document, it can be difficult for anyone to diagnose the issue. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 12-02-2022, 01:44 PM
Captn01 Captn01 is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Novice
Means to easily run Macro from BOTH Windows and MacOS
 
Join Date: Nov 2022
Posts: 6
Captn01 is on a distinguished road
Default

I have attached the document. It is nothing too complicated, at this point it just does some required formatting.
Attached Files
File Type: docm Formatter Declassified.docm (41.4 KB, 6 views)
Reply With Quote
  #9  
Old 12-02-2022, 02:17 PM
Guessed's Avatar
Guessed Guessed is offline Means to easily run Macro from BOTH Windows and MacOS Windows 10 Means to easily run Macro from BOTH Windows and MacOS Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

A macrobutton is not a physical button - it is a field. It displays as text and you can format it to give it background shading or make it stand out.
Paste the following line of text into your document
MacroButton myMacroName Double click to make it so
Change the myMacroName to the name of YOUR macro
Select all that text and press Ctrl-F9 to convert it to a field. Then press F9 to make it display the result.
Now you have a macrobutton field. Double click that text to run the macro.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #10  
Old 12-02-2022, 04:02 PM
macropod's Avatar
macropod macropod is offline Means to easily run Macro from BOTH Windows and MacOS Windows 10 Means to easily run Macro from BOTH Windows and MacOS Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

There is no MACROBUTTON field, or VBA code in your document.

Andrew has given some advice about the former. See attached implementation.
Attached Files
File Type: docm Make It So.docm (46.8 KB, 4 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #11  
Old 12-05-2022, 02:05 PM
Captn01 Captn01 is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Novice
Means to easily run Macro from BOTH Windows and MacOS
 
Join Date: Nov 2022
Posts: 6
Captn01 is on a distinguished road
Default

@Guessed - Yes, I am aware it's not a button! On my sheet I simply formatted the text to look like more like a button and I have already done all that in the spreadsheet I uploaded.

@Macropod - The document I uploaded absolutely has a macro in if and already has a the macrobutton field implemented. See the screenshots attached. I have no idea why when you downloaded it, you cannot see them... I have also reattached the document itself.

Also, I redownloaded the one I uploaded here first and it works fine for me and shows the macro...
Attached Images
File Type: jpg Capture 1.jpg (142.6 KB, 10 views)
File Type: jpg Capture 2.jpg (96.1 KB, 10 views)
Attached Files
File Type: docm Formatter Declassified.docm (41.4 KB, 3 views)
Reply With Quote
  #12  
Old 12-05-2022, 02:26 PM
Italophile Italophile is offline Means to easily run Macro from BOTH Windows and MacOS Windows 11 Means to easily run Macro from BOTH Windows and MacOS Office 2021
Expert
 
Join Date: Mar 2022
Posts: 315
Italophile is just really niceItalophile is just really niceItalophile is just really niceItalophile is just really nice
Default

Your screenshots clearly show that the code is in your Normal template, not the document named Formatter
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
word for Mac unable to format or print documents after upgrade to macOS Big Sur Gerben Word 0 11-28-2020 06:28 AM
macOS Digital signature in excel ki_ha1984 Excel 0 10-05-2019 05:31 AM
Means to easily run Macro from BOTH Windows and MacOS Macro works in Windows XP but not in Windows 7 Baldeagle Word VBA 3 09-30-2013 03:56 AM
Effective means of practice powerpoint powerpointD PowerPoint 0 10-01-2012 04:02 PM
what + (plus) means in word? rus2uk_office Word 0 07-07-2009 10:30 AM

Other Forums: Access Forums

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