I am using Word to preview documents from Access 2007. My existing code ....
This opens the document at 50% zoom just to preview. However the word window covers part of the document. Is there a simple way to make the word window fit the documents current display size? I have attempted the minimise the ribbon as well, but disabling, making invisable dont appear to work.
Any ideas?
Cheers
Mike
Code:
'Previews word document(s) from named path
Public Sub PreviewWordDoc(WordDocFullPath As String, Optional Orientation As String = "Portrait")
Dim objWord As Word.Application
Set objWord = New Word.Application
With objWord
.Documents.Open filename:=WordDocFullPath, readOnly:=True
If Orientation = "Landscape" Then _
.ActiveDocument.PageSetup.Orientation = wdOrientLandscape
.ActiveDocument.ActiveWindow.View.zoom.Percentage = 50
.CommandBars.item("Ribbon").Enabled = False
.CommandBars.item("Ribbon").Visible = False
.windowState = wdWindowStateNormal
.Visible = True
End With
End Sub
Any ideas?
Cheers
Mike