Advertisement
Advertisement
| 06.24.2008 at 04:23PM PDT, ID: 23512991 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: |
'ITEMS AND SALES ARRIVE TO THIS FUNCTION
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim wrdTbl As Word.Table
Dim wrdRow As Word.Row
strTmp = CurrentProject.Path & "\Sales-Sheet-Tailsheet.doc"
strTail = "C:\SALEDB\DocPrep\TailSheet.doc"
FileCopy strTmp, strTail
Set wrdApp = New Word.Application
Set wrdDoc = wrdApp.Documents.Open(strTail)
Set wrdTbl = wrdDoc.Tables(1)
'wrdTbl.Rows.Add
Set wrdRow = wrdTbl.Rows.Last
wrdRow.Cells.Add
wrdRow.Cells.Add
wrdRow.Cells.Add
wrdRow.Cells.Add
wrdRow.Cells.Add
wrdRow.Cells.Add
wrdRow.Cells.Add
If bldghandled = False Then
building_fields = "SQFT:USETYPETEXT"
building_count = 2
'merge cells
wrdRow.Cells(z).Merge wrdRow.Cells(z + 1)
'add table
newtbl = wrdDoc.Tables.Add(wrdRow.Cells(z), 2, 3)
End If
Set wrdDoc = Nothing
'close the word doc
wrdApp.Quit True 'true is for saving changes
Set wrdApp = Nothing
|