Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old August 16th, 2003, 03:11 PM
pablo080 pablo080 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 pablo080 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
create tables iteratively in word

how can i create tables iteratively in word?

thanks

Reply With Quote
  #2  
Old August 23rd, 2003, 05:56 AM
zak2zak zak2zak is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Singapore
Posts: 34 zak2zak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via Yahoo to zak2zak
May i comment ....

May Be This will Help...


Code:
Dim MyDoc As Word.Application
Dim rTable As Range   'create a range variable

Set MyDoc = New Word.Application
With MyDoc
Visible=True
.Documents.Add "normal.dot", , , True
'If table is at end of contents
Set rTable = .ActiveDocument.Content
'If table is at on a bookmark  just select 1 and comment the other
Set rTable = .ActiveDocument.BookMarks("Bookmark").Range
rTable.Collapse Direction:=wdCollapseEnd
'Create The Table with 10 row & 4 column
.ActiveDocument.Tables.Add rTable, 10, 4  'Row=10, Col=4
.ActiveDocument.Tables(1).PreferredWidth = InchesToPoints(10#)
.ActiveDocument.Tables(1).Range.Font.Size = 10
.ActiveDocument.Tables(1).Range.Font.Name = "Arial"
'adjust the column width in inches
.ActiveDocument.Tables(1).Columns(1).Width = InchesToPoints(2#)
.ActiveDocument.Tables(1).Columns(2).Width = InchesToPoints(2#)
.ActiveDocument.Tables(1).Columns(3).Width = InchesToPoints(2#)
.ActiveDocument.Tables(1).Columns(4).Width = InchesToPoints(2#)
.ActiveDocument.Tables(1).Range.Cells(1,1).Range text:="Hey"
__________________
I May Have Misinterpret U'r Post
Correct Me If I Am Wrong......//
Enjoy Coding..........................///

zak2zak

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > create tables iteratively in word


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway