設(shè)為首頁收藏本站Access中國

Office中國論壇/Access中國論壇

 找回密碼
 注冊

QQ登錄

只需一步,快速開始

返回列表 發(fā)新帖
查看: 3509|回復(fù): 2
打印 上一主題 下一主題

如何獲得當(dāng)前Word 表格行數(shù)

[復(fù)制鏈接]
跳轉(zhuǎn)到指定樓層
1#
發(fā)表于 2004-7-20 21:26:00 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
Dim DocApp As Word.Application      '聲明類型

Dim aDoc As Word.Document

Dim DocTable As Word.Table

Dim mReadPathStr As String

mReadPathStr = "C:\Documents and Settings\Administrator\桌面\Test\test.dot"

Set DocApp = CreateObject("Word.Application")

DocApp.Documents.Open (mReadPathStr)

Set aDoc = DocApp.Documents(mReadPathStr)

MsgBox aDoc.Tables(2).Rows    <=====出錯   如何獲得當(dāng)前Word 表格行數(shù)

DocApp.Quit

Set DocApp = Nothing

aDoc.Close

Set aDoc = Nothing

[此貼子已經(jīng)被作者于2004-7-20 13:26:36編輯過]

分享到:  QQ好友和群QQ好友和群 QQ空間QQ空間 騰訊微博騰訊微博 騰訊朋友騰訊朋友
收藏收藏 分享分享 分享淘帖 訂閱訂閱
2#
發(fā)表于 2004-7-21 02:51:00 | 只看該作者
不錯, 收到
3#
 樓主| 發(fā)表于 2004-7-21 21:34:00 | 只看該作者
MsgBox aDoc.Tables(2).Rows.Count   
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則

QQ|站長郵箱|小黑屋|手機版|Office中國/Access中國 ( 粵ICP備10043721號-1 )  

GMT+8, 2025-7-17 00:40 , Processed in 0.094042 second(s), 26 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回復(fù) 返回頂部 返回列表