*-- all the word prep stuff here. Assume all is okay. objwordapplication = CREATEOBJECT("Word.Application") objworddocument = objwordapplication.Documents.Open(myTableDocument) *-- If I know there are only three tables, then I can access my certain table properties by: objworddocument.Tables[2].tablepropertystuffhereBut, what if the user has gone in and modified the document, and added another table? Now there is four, and I only want my specific one... so I will look for some text in my specific table (assume no user changes to that table):
*-- all the word prep stuff here. Assume all is okay. objwordapplication = CREATEOBJECT("Word.Application") objworddocument = objwordapplication.Documents.Open(myTableDocument) oRange = objworddocument.Range(0, 0) WITH oRange.Find .Text = "zzzmytabletext" .MatchCase = .F. .Format = .F. .lFound = .Execute() ENDWITH *-- Assume .lFound is True *-- ??? Lost here. I know my text is there, but how do I know the table number?And my final question: How do I close an automated word document without saving my changes?