![]() |
#1
|
|||
|
|||
![]()
I need to create a macro that prompts the user for a location to find the documents via an InputBox and then applies the features of other macros created in the original document to the opened documents one by one (It opens the document, applies features, repeat)
This is for a school assignment that is due today in a few hours and I am willing to pay if someone can help me figure this out in time - also it is a requirement to use nested loops (Exact description: You must employ nested loops in order to get credit for this feature, an outer loop successively opens each document in the specified location and will apply Features 1 - 7 inside its body) Code:
Sub otherDocuments() ' ' otherDocuments Macro ' This macro opens other documents and applies some features of this document to them ' Dim Folder As String Dim File As String Dim i As Long Folder = InputBox("Please enter the directory of the folder containing the documents") File = Dir(Folder & "\*.docx") i = 1 Dim numDocuments As Long numDocuments = Documents.Count Do While File <> "" Documents.Open FileName:=Folder & "\" & File Do While (i <= numDocuments) Call searchAndReplace i = i + 1 Loop Loop End Sub Any help is greatly appreciated. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
lostinwebspace | Word VBA | 1 | 02-13-2016 10:28 AM |
Help - Need Macro to Apply Blur | SSL | PowerPoint | 6 | 07-26-2015 08:59 AM |
![]() |
AndyDDUK | PowerPoint | 9 | 11-21-2012 08:21 AM |
![]() |
ubns | Word | 1 | 08-02-2012 04:09 AM |
macro to open another document | coconutt | Word VBA | 1 | 06-11-2012 04:39 AM |