473,407 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

problem printin from a OO macro written in basic

1
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?
Feb 4 '10 #1
0 795

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Don | last post by:
Hi NG. I am using some C code in my CPP code, like: extern "C" { #include "myC_Code.h" }
0
by: AAP | last post by:
Good evening: I am having trouble converting macros in Access 2000 into VBA statements using the Tools/Macro/Convert macro to VBA. I get a message stating that "the application can not find...
2
by: Keith Austin | last post by:
I need to produce a macro for a project that I have to do in my course in IT "Certificate III IT (Software Applications) Unit ICAITUO18C". The macro needs to validate previously imported data from...
11
by: foodic | last post by:
Hi all, I have got a problem where i have to execute a portion of code only when a header file is included somewhere in the source file. Can some body explain how to do it. for example if...
2
by: CR | last post by:
How do you "step into" an excel macro when using the VB.NET debugger? I'm using excel 2000. Here's is how I did it with VB6: Dim objExcel As Excel.Application objExcel = New...
2
by: Vicente García | last post by:
hello all, Sorry for my English. I am making up an application and I must show a web. The web contains a power point but I have a problem because I type something like: AxWebBrowser.Navigate(URL) ...
4
by: tfawcet | last post by:
I am having a problem with the Visual C++ compiler with the following error c:\rgb.h(7) : error C2371: 'pix_t' : redefinition; different basic types This refers to a typedef that I have...
0
by: Nizar000 | last post by:
HI, CAN ANYONE HELP ME TO OPEN A FILE WITH EXCEL MACRO WRITTEN IN VISUAL BASIC, WITHOUT SPECIFING IT'S PATH ? MY TXT FILE IS IN THE SAME PLACE WITH THE EXCEL FILE. THE COMMAND : OPEN...
1
by: ericjohnson | last post by:
I've got a macro that has already been written for an Excel spreadsheet used for estimating at work. I know enough VB to write very basic macros, but I cannot understand the logic and purpose behind...
2
by: Stratocaster | last post by:
Hello, and thank you for any help in advance. I need help determining if any commands exist in VB (Excel macro style) that can enable a user to select cells and run a macro which performs...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.