Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-17-2022, 02:09 PM
BrianHoard BrianHoard is offline open several word docs Windows 10 open several word docs Office 2019
Advanced Beginner
 
Join Date: Jul 2022
Location: Haymarket, VA USA
Posts: 85
BrianHoard is on a distinguished road
Default

Does his help...

Method 1: Brute force way, just run Document.Open 10 times, each pointing to the full path of your documents.
Code:
Documents.Open FileName:="doc1.docx"
Documents.Open FileName:="doc2.docx"
Documents.Open FileName:="doc(n).docx"
Method 2: Loop through an array of your document names.
This could be useful if you're getting your doc names programmatically.
Code:
Dim arr_docs(9) As String ' Create a fixed sized array for 10 items.
' Populate each item in the array

arr_docs(0) = "doc1.docx"
arr_docs(1) = "doc2.docx"
' etc

' With all your docs stored in the array, loop through them to open them all.
For each doc in arr_docs
  Documents.Open FileName:=doc
Next doc
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
open several word docs Treversing directories and open WORD-docs ??? ksor Word VBA 0 10-14-2019 05:20 AM
Cannot open older Word docs chas1308 Word 5 05-20-2018 01:40 AM
Can't open Word docs on server macdude425 Other Software 3 12-06-2016 01:37 PM
2016 Word for Mac - How open docs bigger? wmth99 Word 0 12-25-2015 11:17 AM
Word shuts down when trying to open certain docs lesliejames Word 0 01-19-2015 11:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:47 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft