如何使用单词temp-let在word文档中打印新行

时间:2012-05-08 07:22:02

标签: vb.net winforms ms-word

我正在尝试添加新行。但我得到的错误是:3处没有排位置。

          If OperCnt <> 0 Then

                   If myxmlnode.BaseName = "Oper" Then
                      If I < OperCnt Then
                         myxmlnode.Range.Text = DsOper.Tables(0).Rows(I).Item("operationseq").ToString
                        setuptime = setuptime + DsOper.Tables(0).Rows(I).Item("setup")
                        runtime = runtime + DsOper.Tables(0).Rows(I).Item("runtime")
                        OperQty = CType(myDB.RetrieveData("select isnull(SUM(TRXQUANTITY),0) AS TRXQTY from sbm_laboractivity where wo_guid = '" & DsOper.Tables(0).Rows(I).Item("wo_guid") & "' and operationseq = '" & DsOper.Tables(0).Rows(I).Item("operationseq") & "'"), Double)
                    End If
                    If I = OperCnt - 1 Then myxmlnode.Range.Select() : I = I + 1 : GoTo ee
                    myxmlnode.Range.Select()
                    Travelerdoc.ActiveWindow.Selection.InsertRowsBelow()
                    I = I + 1


Here i am trying to add new row

               If myxmlnode.BaseName = "WC" Then myxmlnode.Range.Text =" "
               If myxmlnode.BaseName = "Desc" Then myxmlnode.Range.Text = DsOper.Tables(0).Rows(I - 1).Item("OPS_Note").ToString
              If myxmlnode.BaseName = "LC" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "Setup" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "RunTime" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "Qty" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "CompQty" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "RemQty" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "TotalSetup" Then myxmlnode.Range.Text = ""
              If myxmlnode.BaseName = "TotalRunTime" Then myxmlnode.Range.Text = ""
        End If
      End If

你能否就此提出任何建议。

0 个答案:

没有答案