Scripting MS-Access from PythonCom

BORGHI BRUNO bb at free.fr
Mon Oct 11 15:45:52 EDT 1999


I'm writing a small app creating a MS-Access database from csv files, using
OLE automation through Pythoncom.
So far, so good. I can create a database, populate it, create computed
reports, print them. Nice. 
There is one thing I still can't do: setting the margins in a report.

There is a property of reports named 'PrtMip' that is supposed to be used
for that. MS-Access documentation says that PrtMip is a string packing a
struct of 14 short integers. 
I can get the value of PrtMip, although report.PrtMip gives me a tuple of
56 integers, corresponding to the bytes of 14 long integers..
But I don't know how to set a new value. I tried a tuple of 56 integers, of
14 integers. Doesn't work. I tried some variations about a string packing
integers. Doesn't work either.

My questions are :
1/ Does anyone ever tried to set the margins of report in MS-Access through
Pythoncom and could tell me how to achieve this ?
2/ I don't understand why report.PrtMip returns a tuple of 56 integers,
rather than a tuple of 28 integers. Can someone explain ?

Thanx

Bruno Borghi
bruno.borghi at pobox.com




More information about the Python-list mailing list