1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
Variant vOOoPrCount = vOOoOpenOffice.OleFunction("Bridge_GetStruct","com.sun.star.beans.PropertyValue");
Variant vOOoPrPages = vOOoOpenOffice.OleFunction("Bridge_GetStruct","com.sun.star.beans.PropertyValue");
vOOoPrCount.OlePropertySet("Name","Count");
vOOoPrCount.OlePropertySet("Value",1); //Nombre d'ensembles de pages à imprimer
vOOoPrPages.OlePropertySet("Name","Pages");
vOOoPrPages.OlePropertySet("Value","1-4");//Pages à imprimer ; "1-" devrait convenir dans votre cas
int Bounds2[2] = {0,1};// Selon le nombre de propriétés à utiliser;
//int Bounds2[2] = {0,3};// pour 4 props par ex.
Variant vOOoPrProps = VarArrayCreate(Bounds2, 1, varVariant);
vOOoPrProps.PutElement(vOOoPrCount,0);
vOOoPrProps.PutElement(vOOoPrPages,1);
OOoDocument.OleFunction("Print",vOOoPrProps); |
Partager