WBURKERT
Technical User
- May 28, 2010
- 73
Here's my working code.
I need to make column(3) currency format. I would like an Accounting format (dollar sign on left side of a cell and a two decimal place number to the right) But a Currency format, without any symbol could work too.
Set Goods = docDest.Tables.Add(docDest.Bookmarks("Sec" & s).Range, RowCount, ColCount)
With Goods
'.Range.Style = "Table Simple 1,greenbar"
.Columns(1).Width = InchesToPoints(1)
.Columns(2).Width = InchesToPoints(4)
.Columns(3).Width = InchesToPoints(1)
.Rows(1).Range.Font.Bold = True
.Rows.Alignment = wdAlignRowCenter
End With
For Each oCell In Goods.Range.Cells
StatusBar = "RowCount = " & RowCount & " ; ColCount = " & ColCount & " ; docDest = " & docDest & " ; Bookmark = Sec" & s
oCell.Range.Text = rngWithData.Cells(oCell.RowIndex, oCell.ColumnIndex).Value
Next
Set rngWithData = Nothing
Set Goods = Nothing
Next s
I need to make column(3) currency format. I would like an Accounting format (dollar sign on left side of a cell and a two decimal place number to the right) But a Currency format, without any symbol could work too.
Set Goods = docDest.Tables.Add(docDest.Bookmarks("Sec" & s).Range, RowCount, ColCount)
With Goods
'.Range.Style = "Table Simple 1,greenbar"
.Columns(1).Width = InchesToPoints(1)
.Columns(2).Width = InchesToPoints(4)
.Columns(3).Width = InchesToPoints(1)
.Rows(1).Range.Font.Bold = True
.Rows.Alignment = wdAlignRowCenter
End With
For Each oCell In Goods.Range.Cells
StatusBar = "RowCount = " & RowCount & " ; ColCount = " & ColCount & " ; docDest = " & docDest & " ; Bookmark = Sec" & s
oCell.Range.Text = rngWithData.Cells(oCell.RowIndex, oCell.ColumnIndex).Value
Next
Set rngWithData = Nothing
Set Goods = Nothing
Next s