Hello,
I've installed Invoice_Forms_v2.odb from:
[Example] Invoice Forms (without macros)
and i need to print 2 copies each time when i print. But without using the printer options (number of copies).
Thanks and bye!
[Solved] Print multiple copies dBase
-
- Posts: 16
- Joined: Sat Jan 20, 2018 4:26 pm
- Location: Greece
[Solved] Print multiple copies dBase
Last edited by christos73 on Sun Jan 21, 2018 9:00 pm, edited 2 times in total.
Apache OpenOffice 4.1.7 - -
Re: Print multiple copies dBase
print 2 copies of what?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 16
- Joined: Sat Jan 20, 2018 4:26 pm
- Location: Greece
Re: Print multiple copies dBase
to be printed 2 times the same page.
maybe with macro(CopyCount) ?
maybe with macro(CopyCount) ?
Apache OpenOffice 4.1.7 - -
Re: Print multiple copies dBase
I don't know any macro "CopyCount". 2 times which page? What is a "page" in the database you have linked?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Posts: 16
- Joined: Sat Jan 20, 2018 4:26 pm
- Location: Greece
Re: Print multiple copies dBase
I want to make a button in calc so when i press it 'll print my sheet 2 times without doing it manually from Print 'Number of copies"
Forcing it to print 2 copies with one click.
Forcing it to print 2 copies with one click.
Apache OpenOffice 4.1.7 - -
Re: Print multiple copies dBase
Import the record set in question 2 times into Calc.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
-
- Volunteer
- Posts: 1547
- Joined: Wed Jun 24, 2015 12:56 am
- Location: Colorado, USA
Re: Print multiple copies dBase
Chapter 13 of Andrew Pitonyak's book “OpenOffice.org Macros Explained” includes a discussion of writing macro code to print Writer documents as well as Calc documents.
Chapter 5 of his download “Useful Macro Information” has a section named “Print Current Document”
both can be downloaded from
http://www.pitonyak.org/oo.php
You should also be aware that a Base form is actually a Writer document.
Chapter 5 of his download “Useful Macro Information” has a section named “Print Current Document”
both can be downloaded from
http://www.pitonyak.org/oo.php
You should also be aware that a Base form is actually a Writer document.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
-
- Posts: 16
- Joined: Sat Jan 20, 2018 4:26 pm
- Location: Greece
Re: Print multiple copies dBase
Found it.
Import the record set? how?
Code: Select all
REM ***** BASIC *****
Sub printDocOnce
DIM oDoc
oDoc = ThisComponent
REM Set backgroundImage-option to False
DIM oSettings
oSettings = oDoc.createInstance("com.sun.star.text.DocumentSettings")
rem oSettings.PrintPageBackground = False
REM Set printOptions
DIM mPrintOpts(2) AS NEW com.sun.star.beans.PropertyValue
mPrintOpts(0).Name = "CopyCount"
mPrintOpts(0).Value = 1
mPrintOpts(1).Name = "Collate"
mPrintOpts(1).Value = True
REM Print
oDoc.Print(mPrintOpts())
REM Set backgroundImage-option back to True
rem oSettings.PrintPageBackground = True
REM Do a 0-print to set the option
DIM mPrintOpts2(0) AS NEW com.sun.star.beans.PropertyValue
mPrintOpts2(0).Name = "CopyCount"
mPrintOpts2(0).Value = 0
oDoc.Print(mPrintOpts2())
End Sub
Apache OpenOffice 4.1.7 - -