msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete Row from a table in a word document using VB6

 
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE Automation
Author Message
Flyguy



Joined: 04 Oct 2007
Posts: 1

PostPosted: Wed Jul 26, 2006 2:19 pm    Post subject: Delete Row from a table in a word document using VB6 Reply with quote

I have a word object that I am manipulating with vb6. In the document I have
a table that I will need to delete a row from. How can I do this in VB?

Archived from group: microsoft>public>vb>ole>automation
Back to top
View user's profile Send private message
"Peter Huang" [MSFT]



Joined: 04 Oct 2007
Posts: 107

PostPosted: Thu Jul 27, 2006 9:52 am    Post subject: RE: Delete Row from a table in a word document using VB6 Reply with quote

Dear Customer,

How did you host the Document in VB6?
Via OLEContainer or just automation Word to do that?

Based on my research, we can use the code below to delete a row.
Sub Test()
Dim t As Table
Set t = ThisDocument.Tables(1)
t.Rows(2).Delete
End Sub

Note: the code is for VBA, but it is similar in VB6, we just need to
replace the ThisDocument with the Doc instance in VB6 get from Word
application.

If you need any further help, please feel free to let me know.


Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Inserting a picturefrom an access database into a word table I have an application that produces printable output from an Access database in a Word document. I need to add pictures from the database, stored as OLE objects, to the word document. How do I do this? regards Jack

embed or save ms word file into ole field table Please help me ! Anybody can help me with a code to embed an ms word file into an access table ? I have ms word templates with bookmarks in my hard disk. So far I can open the template through a button in my access form, insert the bookmarks with data fro

embed or save ms word file into ole field table Please help me ! Anybody can help me with a code to embed an ms word file into an access table ? I have ms word templates with bookmarks in my hard disk. So far I can open the template through a button in my access form, insert the bookmarks with data fro

Word document not created Hello, I hope I am posting in the right forum, please let me know if not... I have an asp website which calls a VB object from a .dll The role of this object is to create a Word document from a .dot model, and save it on the server. Once the document is c

Determine if word document is curropt? Hi All, Through VB ,I wote a loop in which a word document is opened, search for a string and close teh file. The loops works perfectly untill it comes accros a curropt word document, I tried trapping the error but no was not successful, is there a way to
Post new topic   Reply to topic    msvisual.com Forum Index -> OLE Automation All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group