Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-11-2025, 10:45 AM
Tony Hedge Tony Hedge is offline How to Pause a Macro and Display a Document Windows 11 How to Pause a Macro and Display a Document Office 2021
Novice
How to Pause a Macro and Display a Document
 
Join Date: Feb 2025
Posts: 1
Tony Hedge is on a distinguished road
Question How to Pause a Macro and Display a Document

I am running Microsoft 365 on Windows 11.




I have developed a Word macro that loops over all the .doc, .docx and .rtf file in a folder and re-formats them.


After I have reformatted each file I wish to display the file briefly (2s) whilst the macro sleeps. I have not found a way to do this.


If I use the Windows Sleep API, it sleeps the document windows as well as the macro.


If have tried using the Excel Wait method, but despite adding a reference to the Microsoft Excel 16.0 Object Library, the macro throws an error when it reaches the Wait statement.


I have tried adding many DoEvent statements, but fails as well.


Does anyone know how to pause a macro (briefly) and display a document window?
Reply With Quote
 

Tags
sleep, vba editor



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop-down Macro to show different display / value Grif 2200 Word 1 09-13-2019 01:34 PM
Pause a video ako PowerPoint 3 08-30-2019 06:57 AM
Pause tasks automatically schmil Project 0 05-16-2017 10:01 AM
Pause / restart a background MP3 ? Clark711 PowerPoint 3 07-29-2013 10:04 AM
Macro to display help text rusteinberg Word VBA 0 04-03-2013 09:55 AM

Other Forums: Access Forums

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