L
Lutiana
Hi all, I am new at customizing outlook forms and I am having an issue
with trying to have multiple print buttons on a form.
I am trying to create a form that will allow me to print 2 kinds of
things. One is an internal doc for our filing and the other is one for
our customer (these do not need to be printed at the same time, nor do
I think they ever would be).
I am using xprint and I am trying to extrapolate from the MS example
how to do this. If I use just one button it works fine, but as soon as
I try to add another I get an error message (after the option to
debug).
Error 1: Object doesn't support this property or method:
'objPage2.Xprint2' Line No. 17
Then when I click the button I get: Object required: 'objXprint2'
I cannot seem to find any information anywhere on this, and as near as
a I can see the code is complete.
Here is my code:
Dim objInsp
Dim objPage1, objPage2
Dim objXPrint1, objXPrint2
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage1 = objInsp.ModifiedFormPages("RMA Entry")
Set objXPrint1 = objPage1.XPrint1
objXPrint1.Preview = True
objXPrint1.Controls = objPage1.Controls
End Function
Function Item2_Open()
Set objInsp = Item.GetInspector
Set objPage2 = objInsp.ModifiedFormPages("PrintReport")
Set objXPrint2 = objPage2.XPrint2
objXPrint2.Preview = True
objXPrint2.Controls = objPage2.Controls
End Function
Sub cmdPrint_Click()
objXPrint1.PrintForm
End Sub
Sub cmdPrintReport_Click()
objXPrint2.PrintForm
End Sub
Any help would be greatly appreciated.
Thanks
J
with trying to have multiple print buttons on a form.
I am trying to create a form that will allow me to print 2 kinds of
things. One is an internal doc for our filing and the other is one for
our customer (these do not need to be printed at the same time, nor do
I think they ever would be).
I am using xprint and I am trying to extrapolate from the MS example
how to do this. If I use just one button it works fine, but as soon as
I try to add another I get an error message (after the option to
debug).
Error 1: Object doesn't support this property or method:
'objPage2.Xprint2' Line No. 17
Then when I click the button I get: Object required: 'objXprint2'
I cannot seem to find any information anywhere on this, and as near as
a I can see the code is complete.
Here is my code:
Dim objInsp
Dim objPage1, objPage2
Dim objXPrint1, objXPrint2
Function Item_Open()
Set objInsp = Item.GetInspector
Set objPage1 = objInsp.ModifiedFormPages("RMA Entry")
Set objXPrint1 = objPage1.XPrint1
objXPrint1.Preview = True
objXPrint1.Controls = objPage1.Controls
End Function
Function Item2_Open()
Set objInsp = Item.GetInspector
Set objPage2 = objInsp.ModifiedFormPages("PrintReport")
Set objXPrint2 = objPage2.XPrint2
objXPrint2.Preview = True
objXPrint2.Controls = objPage2.Controls
End Function
Sub cmdPrint_Click()
objXPrint1.PrintForm
End Sub
Sub cmdPrintReport_Click()
objXPrint2.PrintForm
End Sub
Any help would be greatly appreciated.
Thanks
J