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
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