VB +access 把MSHFlexGrid中数据输出到word

时间:2012-07-03 20:37:44
【文件属性】:

文件名称:VB +access 把MSHFlexGrid中数据输出到word

文件大小:13KB

文件格式:FRM

更新时间:2012-07-03 20:37:44

vb access

Private Sub Command1_Click() On Error Resume Next Dim wApp As New Application Dim wDoc As Document Dim wNewTable As Table Set wDoc = wApp.Documents.Add Selection.Range Set wNewTable = wDoc.Tables.Add(wDoc.Range, MSHFlexGrid1.Rows, MSHFlexGrid1.Cols) For i = 0 To MSHFlexGrid1.Rows - 1 For j = 0 To MSHFlexGrid1.Cols - 1 wNewTable.Cell(i + 1, j + 1).Range.Text = MSHFlexGrid1.TextMatrix(i, j) Next Next wApp.Visible = True End Sub


网友评论

  • 实在是太烂了
  • 帮了我很大的忙,直接成功编程
  • 帮了我很大的忙,直接成功编程
  • 只有一个word.frm是要闹哪样?