OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

printing with a macro

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
iust
Newbie
Newbie


Joined: 01 Feb 2010
Posts: 2

PostPosted: Thu Feb 04, 2010 1:13 am    Post subject: printing with a macro Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group