Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-12-2017, 08:04 AM
elbartje elbartje is offline Loop true all opned word document Windows 10 Loop true all opned word document Office 2016
Novice
Loop true all opned word document
 
Join Date: Jun 2017
Posts: 4
elbartje is on a distinguished road
Default Loop true all opned word document

Hi all



I want to loop true all opened word documents but my code stays on the first selected file. It also only just loops 2 times even if I have more files opened.

Dim wd As Range

For Each wd In ActiveDocument.Words

wd.Select
MsgBox (wd.Document.Name)
'Do stuff

next wd
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VB for Word - Need macro to loop each line in a document NDeane Word VBA 5 12-22-2015 08:12 PM
Loop true all opned word document Loop through files and Copy Table Row and Paste into Different Document spiderman1369 Word VBA 2 10-15-2014 08:30 AM
Loop true all opned word document Loop through each Line in Word ilcaa72 Word VBA 4 02-13-2014 11:48 AM
Loop true all opned word document Loop action in Word until not found kilburfi Word VBA 2 07-12-2013 01:26 AM
Loop true all opned word document Macro to loop in Word Yamaha Rider Word VBA 2 02-07-2012 05:33 PM

Other Forums: Access Forums

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