![]() |
#2
|
||||
|
||||
![]()
Hi Rutger,
What constitutes an unconverted file vs a converted file? Apart from that, the basic code for selecting a folder and looping through the Word documents in it is: 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 <> "" If strFolder & "\" & strFile <> strDocNm Then Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False) With wdDoc 'Do something .Close SaveChanges:=True End With End If 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] |
Tags |
macro vba word |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Carolin | Word VBA | 3 | 12-14-2014 04:01 AM |
Multiple PPT files in different windows? | Caroline | PowerPoint | 0 | 04-11-2011 09:40 AM |
![]() |
psrs0810 | Excel | 2 | 10-25-2010 01:49 PM |
Merging Multiple Word files into One | Stattovic | Word | 0 | 01-06-2010 07:19 AM |
Help-overwriting files-could it be macro virus? | Timpotty | Word | 0 | 03-06-2009 04:28 PM |