I'm having a heck of a time getting my numeric fields to right justify in a simple list report. I'm generating a Word document through VB6 and using an ado recordset as my source. I decided not to use DataReports because I'm picking my (Oracle) database at run time and everything I've found for DataReports requires that I specify the database at design time.
I first tried using .SELECTION.TYPETEXT to create the detail lines of the report but the numeric fields were straggling all over the place. I was Formating the fields as "##,##0.0" but it was collapsing the number to the left and I couldn't come up with a way to right align them.
I decided to go to a table instead (which I prefer as it solves my word wrap problem in description fields), but the numeric fields are still left justifying instead of right justifying inside the cell and I can't find any alignment property that seems to work with .CELL. I tried playing around with .LEFTPADDING, trying to subtract the length of the data from the width of the cell to see how much padding I needed, but I can't figure out how to translate the length of the field to points - I tried PicaToPoints as that seemed the closest option but it didn't work. I'm still using FORMAT and the numeric data is still collapsing to the left when there are no digits, the place holders don't seem to be working at all.
I've searched the VB help in Word, the MSN site, and the forums and FAQs here but I haven't been able to come up with anything that works - or rather with anything that I have been able to make work! Any ideas will be greatly appreciated
I first tried using .SELECTION.TYPETEXT to create the detail lines of the report but the numeric fields were straggling all over the place. I was Formating the fields as "##,##0.0" but it was collapsing the number to the left and I couldn't come up with a way to right align them.
I decided to go to a table instead (which I prefer as it solves my word wrap problem in description fields), but the numeric fields are still left justifying instead of right justifying inside the cell and I can't find any alignment property that seems to work with .CELL. I tried playing around with .LEFTPADDING, trying to subtract the length of the data from the width of the cell to see how much padding I needed, but I can't figure out how to translate the length of the field to points - I tried PicaToPoints as that seemed the closest option but it didn't work. I'm still using FORMAT and the numeric data is still collapsing to the left when there are no digits, the place holders don't seem to be working at all.
I've searched the VB help in Word, the MSN site, and the forums and FAQs here but I haven't been able to come up with anything that works - or rather with anything that I have been able to make work! Any ideas will be greatly appreciated