Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2005

Tip: Looking for answers? Try searching our database.

Inserting table at cursor

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jesper Fj?lner - 07 Apr 2005 20:34 GMT
I want to insert a table at the cursor and place the cursor in the first
cell.
I'm using :

Dim oTbl as word.table
Set oTbl = ActiveDocument.Tables.Add(oWord.Selection.Range, 1, 6)
oTbl.Select

but I get an error saying that the add method failed. What wrong?
Thanks for your help.

Signature

Jesper Fj?lner
Denmark

Jean-Guy Marcil - 08 Apr 2005 00:26 GMT
Jesper Fj?lner was telling us:
Jesper Fj?lner nous racontait que :

> I want to insert a table at the cursor and place the cursor in the
> first cell.
[quoted text clipped - 6 lines]
> but I get an error saying that the add method failed. What wrong?
> Thanks for your help.

Where and how is oWord defined?

By the way, you do not need special code to place the cursor in the first
cell. After the Add method executes. the cursor is automatically in the
first cell.

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.