Y
Yarroll
Hello,
Is there a method to make Word a slideshow tool for text documents in a
specific folder? Word would open these documents one by one for, say 2-3
seconds each and then close them down. The best I managed to come up with is
inserted below, obviously I'm missing some sort of a "Pause" statement to
tell Word to stop for a while on the line marked below.
My top dream would be to make Word stop for as long as needed on an open
document (keyboard combination) and then resume the routine (by another
keyboard combination). Otherwise, with a few thousand files in a folder -
all of which need to be opened for 3 seconds each - I'd be glued to the
screen for hours :-((
Thanks. All the best
Yarroll
------------
Dim wbkDocument As Document
Dim i As Long
Application.ScreenUpdating = False
With Application.FileSearch
..NewSearch
..LookIn = "E:\work"
..SearchSubFolders = False
..FileName = "*.txt"
..MatchTextExactly = True
..FileType = msoFileTypeWordDocuments
If .Execute(msoSortByFileName) > 0 Then
For i = 1 To .FoundFiles.Count
Set wbkDocument = Documents.Open(.FoundFiles(i))
wbkDocument.Activate
' this is where I want Word to stop for a while
wbkDocument.Close
Next i
Else
MsgBox "No documents!"
End If
End With
Application.ScreenUpdating = True
End Sub
Is there a method to make Word a slideshow tool for text documents in a
specific folder? Word would open these documents one by one for, say 2-3
seconds each and then close them down. The best I managed to come up with is
inserted below, obviously I'm missing some sort of a "Pause" statement to
tell Word to stop for a while on the line marked below.
My top dream would be to make Word stop for as long as needed on an open
document (keyboard combination) and then resume the routine (by another
keyboard combination). Otherwise, with a few thousand files in a folder -
all of which need to be opened for 3 seconds each - I'd be glued to the
screen for hours :-((
Thanks. All the best
Yarroll
------------
Dim wbkDocument As Document
Dim i As Long
Application.ScreenUpdating = False
With Application.FileSearch
..NewSearch
..LookIn = "E:\work"
..SearchSubFolders = False
..FileName = "*.txt"
..MatchTextExactly = True
..FileType = msoFileTypeWordDocuments
If .Execute(msoSortByFileName) > 0 Then
For i = 1 To .FoundFiles.Count
Set wbkDocument = Documents.Open(.FoundFiles(i))
wbkDocument.Activate
' this is where I want Word to stop for a while
wbkDocument.Close
Next i
Else
MsgBox "No documents!"
End If
End With
Application.ScreenUpdating = True
End Sub