E
Eapen
A custom built application's code is written to display two MS Word 2003
documents on a single screen by splitting the screen horizontally into two.
One document is to appear on the top half of the screen, while the other
document is to open up on the bottom half.
Instead, we find that the Word documents open up on the full screen, one
behind the other.
Strangely, the same code/application works exactly as intended on a
different PC having supposedly similar environment ( Windows XP/ Office 2003)
Are there any settings that control this? What could be causing the code to
behave different on the two machines running Office 2003 and XP?
Code used for the purpose 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
--
Warm Regards,
Eapen
Eapen V. Eapen
Ph (W) 91 80 51927132
Ph (Jump Number) 732 457 1996 x 7132
documents on a single screen by splitting the screen horizontally into two.
One document is to appear on the top half of the screen, while the other
document is to open up on the bottom half.
Instead, we find that the Word documents open up on the full screen, one
behind the other.
Strangely, the same code/application works exactly as intended on a
different PC having supposedly similar environment ( Windows XP/ Office 2003)
Are there any settings that control this? What could be causing the code to
behave different on the two machines running Office 2003 and XP?
Code used for the purpose 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
--
Warm Regards,
Eapen
Eapen V. Eapen
Ph (W) 91 80 51927132
Ph (Jump Number) 732 457 1996 x 7132