iust Newbie

Joined: 01 Feb 2010 Posts: 2
|
Posted: Thu Feb 04, 2010 1:13 am Post subject: printing with a macro |
|
|
Hello!
I have this problem with printing a document using a macro:
sub printbutton
....
for i = 1 to nrpag
PrintDoc(i, i)
next i
....
end sub
sub PrintDoc(ByVal ii as integer, jj as integer)
...
Dim PrintProperty(1) as New com.sun.star.beans.PropertyValue
...
if ii <> jj then
pagina = Cstr$(ii) & "-" & CStr$(jj)
else
pagina = CStr$(ii)
end if
rem MsgBox pagina
PrintProperty(0).Name = "CopyCount"
PrintProperty(0).Value = 1
PrintProperty(1).Name = "Pages"
PrintProperty(1).Value = pagina
thisComponent.Print(PrintProperty)
end sub
Now, my printbutton macro calls in a FOR the PrintDoc macro and:
if I active that MsgBox the PrintDoc macro works well printing the two pages one after one.
if I make it a commentary the macro prints only the first page.
can someone tell me where is the problem, pls? |
|