Forum Discussion
Storming
Feb 07, 2024Brass Contributor
Unable to open a Word document maximised
Hi,
I have tried several suggestions from the web to open a Word document maximised from my Access application.
All are opening the document but not maximising it.
My current code is
Set myWord = CreateObject("Word.Application")
myWord.Visible = True
myWord.Documents.Open FileName:="C:\Users\Norman\Desktop\template for estimates.docx", ReadOnly:=True
With myWord
.Application.WindowState = 1
.ActiveWindow.ActivePane.View.Zoom.Percentage = 100
End With
Set myWord = Nothing
End Sub
Anyone any suggestions please?
- Tom_van_StiphoutSteel ContributorMaybe the built-in Shell function would work?
Disadvantage is that you would need to know the path to word.exe.
The ShellExecute Windows API does not have this disadvantage.- StormingBrass Contributor
Hi, thanks for the suggestion.
I tried the shell command to open win word and the document and got the same result, not maximised.