Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Sub CallChangeTemplates() ChangeTemplates "c:\temp\docs", "*.doc*" End Sub Sub ChangeTemplates(strFolder As String, strFilePattern As String) Dim strFileName As String Dim strFolders() As String Dim iFolderCount As Integer Dim i As Integer Dim Doc As Document 'collect child folders strFileName = Dir$(strFolder & "\", vbDirectory) Do Until strFileName = "" If (GetAttr(strFolder & "\" & strFileName) And vbDirectory) = vbDirectory Then If Left$(strFileName, 1) <> "." Then ReDim Preserve strFolders(iFolderCount) strFolders(iFolderCount) = strFolder & "\" & strFileName iFolderCount = iFolderCount + 1 End If End If strFileName = Dir$() Loop 'process files in current folder strFileName = Dir$(strFolder & "\" & strFilePattern) Do Until strFileName = "" DoEvents Set Doc = Documents.Open(strFolder & "\" & strFileName) Doc.AttachedTemplate = NormalTemplate Doc.Close wdSaveChanges strFileName = Dir$() Loop 'look through child folders For i = 0 To iFolderCount - 1 ChangeTemplates strFolders(i), strFilePattern Next i End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.