![]() |
|
#4
|
||||
|
||||
|
Hi sqzdog,
Try something along the lines of: Code:
Sub UpdateDocuments()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, wdDoc As Document
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFile = Dir(strFolder & "\*.doc", vbNormal)
While strFile <> ""
Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
With wdDoc.Sections(1).Footers(wdHeaderFooterPrimary).Range
.Text = "My Footer Text"
With .Font
.Size = 15
.Name = "Arial"
.Bold = True
End With
End With
wdDoc.Close SaveChanges:=True
strFile = Dir()
Wend
Set wdDoc = Nothing
Application.ScreenUpdating = True
End Sub
Function GetFolder() As String
Dim oFolder As Object
GetFolder = ""
Set oFolder = CreateObject("Shell.Application").BrowseForFolder(0, "Choose a folder", 0)
If (Not oFolder Is Nothing) Then GetFolder = oFolder.Items.Item.Path
Set oFolder = Nothing
End Function
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Any easy way to separate a Word document into separate files? | SamHelm | Word | 0 | 08-21-2010 05:29 AM |
Cannot open two separate MS word window
|
bunny_biceps | Word | 2 | 08-17-2010 01:51 PM |
| Headers and Footers | OverAchiever13 | Word | 1 | 05-27-2010 01:30 PM |
CHALLENGE! Issue sorting data containing relative references on a separate tab
|
lax828 | Excel | 3 | 01-07-2010 11:28 AM |
| Can I separate a word Doc (docx) from the template used to create it (dotx)? | paulnevlud | Word | 2 | 12-14-2009 10:13 AM |