![]() |
#5
|
|||
|
|||
![]()
I have never created a Word Macro, so this is a bit rudimentary, but maybe a proof of concept?
I think different monitor resolutions will need different numbers so you need to work out what is best and adjust w for width and h for height as required - my monitors are 1920x1080 You will need to put your file path in at the p variable and the file names in f1, f2 and f3. Code:
Sub OpenFiles() Dim l As Long ' left most position Dim h As Long ' height of window Dim w As Long ' width of window Dim p As String 'file path Dim f1 As String, f2 As String, f3 As String 'file names p = "E:\" '<----- your file path f1 = "One.docx" '<----- your left most file f2 = "Two.docx" '<----- your next left most file f3 = "Three.docx" '<----- your next left most file l = 0 '<----- window starting point w = 250 '<----- your window width h = 800 '<----- your window height 'File 1 Documents.Open p & f1 With Tasks(f1) .WindowState = wdWindowStateNormal .Move Top:=0, Left:=l .Width = w .Height = h End With 'File 2 Documents.Open p & f2 With Tasks(f2) .WindowState = wdWindowStateNormal .Move Top:=0, Left:=l + w .Width = w .Height = h End With 'File 3 Documents.Open p & f3 With Tasks(f3) .WindowState = wdWindowStateNormal .Move Top:=0, Left:=l + w + w .Width = w .Height = h End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
MANOHAR | Word | 5 | 11-14-2017 03:06 AM |
![]() |
jpaul | Word | 1 | 03-09-2015 01:23 PM |
Word no longer allows multiple documents to be open | Steve's Computer | Word | 1 | 03-22-2014 01:55 PM |
trying to open a word 2010 document and opens the file conversion window | starfish | Word | 2 | 05-24-2012 12:06 AM |
![]() |
swifty2010 | Office | 1 | 04-16-2012 04:47 AM |