Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2022, 04:24 PM
Guessed's Avatar
Guessed Guessed is offline Loop Through all documents in a folder Windows 10 Loop Through all documents in a folder Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
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

You can test whether Word considers the document had a change made before deciding whether to save.
Try changing this code
Code:
    With wdDoc
      Call Foot2Inline(wdDoc)
      .Close SaveChanges:=True
    End With
To this (untested aircode)


Code:
    With wdDoc
      Call Foot2Inline(wdDoc)
      If .Saved then
         .Close SaveChanges:=False
      Else
         .Close SaveChanges:=True
      End If
    End With
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Loop Through all documents in a folder How to open Documents folder directly from CTRL+O of Open folder on QAT scvjudy Word 2 08-11-2014 10:58 PM
Loop Through all documents in a folder Content of all documents in folder changes to match one of them jemmac2525 Word 2 11-11-2013 12:32 AM
Office 2010 Can't Open Or Save Documents in My Documents Folder trippb Office 1 07-12-2013 07:29 AM
Loop Through all documents in a folder Documents saved to wrong folder stevecarr Word 1 09-22-2011 05:32 AM
Loop through folder of workbooks and copy range to other workbook Snvlsfoal Excel Programming 3 07-29-2011 05:55 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:47 PM.


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