Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6  
Old 01-29-2020, 05:57 AM
rmoyar rmoyar is offline Static Folder Locations to Automate a Find and Replace using Word VBA Windows 10 Static Folder Locations to Automate a Find and Replace using Word VBA Office 2019
Novice
Static Folder Locations to Automate a Find and Replace using Word VBA
 
Join Date: Jan 2020
Posts: 4
rmoyar is on a distinguished road
Default

First off, thank you all for your assistance.

@guessed...

I had a question about the fso.GetFolder. If I were to add a block of code after the For loop, and changed the mySource to

Set mySource = fso.GetFolder("C:\Users\rmoyar\Desktop\TestEnviron ment\Macro Testing\Test 2")

And then reran the for loop, would that produce the same functionality after completing folder 'Test 1' for 'Test 2'?

I think you and I were having the same ideas. I was planning on making it work for one, and then calling separate subs for each task. Was planning on making an array that would house the paths of each folder location, and step through that (let's say in a k variable incremental fashion), and pass that back as the variable mySource in the future development, and then in the main sub would call another sub, call it the 'loopSub' that would do the For each file in mySource.Files.

this is certainly exciting for me, as it is well beyond capabilities I have done before, and I am more in favor of learning how it works so that I may apply these skills to other things more readily. I saw the plug-in that @gmaxey mentioned, and again, I think I would prefer to learn myself (may in the future recommend this to others, but for now just wanted to take this as an educational opportunity).

Again, thank you all!

TL;DR version - if I have another line that is mySource = fso.GetFolder(<Test 2\>) will that then process Test 2 files after Test 1 is completed?
Reply With Quote
 

Tags
copy and paste, looping, word vba macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Static Folder Locations to Automate a Find and Replace using Word VBA Word find and replace ganesang Word 4 11-27-2018 12:04 AM
In Find and Replace, can Word stop after each Replace? wardw Word 1 06-08-2017 02:47 PM
Static Folder Locations to Automate a Find and Replace using Word VBA Find & replace footer text in a folder of Word 2010 documents kennethc Word 3 03-28-2015 02:49 AM
Static Folder Locations to Automate a Find and Replace using Word VBA Bad view when using Find and Find & Replace - Word places found string on top line paulkaye Word 4 12-06-2011 11:05 PM
Looking for a way to automate moving emails to folder middletree Outlook 1 09-28-2010 01:24 PM

Other Forums: Access Forums

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