Word display problem

N

nidhil

Hi

thanx for your reply ,the problem is when i'm trying to open two documents
using VB application it will display the document one below another like a
split screen.based on screen position only document is displayed like a split
screen and Code is given below

With mvarobjword.MSWord

For intCount = 1 To .Windows.Count

If InStr(1, .Windows(intCount).Caption, mvarTest, vbTextCompare)
<> 0 _
And mvarTest<> "" Then
With .Windows(intCount)
.WindowState = wdWindowStateNormal
.Height = Screen.Height / 20 / 2
.Width = Screen.Width / 20
If blnTop = False Then
.Top = 0
Else
.Top = Screen.Height / 20 / 2
End If
.Left = 0
blnTop = True
End With
End If

If InStr(1, .Windows(intCount).Caption, mvartest1,
vbTextCompare) <> 0 _
And mvarTest1<> "" Then
With .Windows(intCount)
.WindowState = wdWindowStateNormal
.Height = Screen.Height / 20 / 2
.Width = Screen.Width / 20
If blnBottom = False Then
.Top = Screen.Height / 20 / 2
Else
.Top = 0
End If
.Left = 0
blnBottom = True
End With
End If

Next

End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top