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 / Tables / October 2006

Tip: Looking for answers? Try searching our database.

Automation returns incorrect data (Threading.Thread.Sleep fixes)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brett Shearer - 11 Oct 2006 02:28 GMT
I am reading large word documents to create c# source files and need to use
the texture of a cell to separate the data I need.

Without the sleep command the cell shading texture is not always returns
correctly.
Is there a better (correct) way to handle this?

if (identifier.StartsWith("Record Identifier"))
{
    if (table.Cell(1, 1).Shading.Texture != WdTextureIndex.wdTexture15Percent)
    {
        System.Threading.Thread.Sleep(1000);
    }
    if (table.Cell(1, 1).Shading.Texture == WdTextureIndex.wdTexture15Percent)
    {
        ProcessTable(table);
    }
}
Robert M. Franz (RMF) - 30 Oct 2006 10:09 GMT
Hi Brett

> I am reading large word documents to create c# source files and need to use
> the texture of a cell to separate the data I need.
[quoted text clipped - 14 lines]
>     }
> }

Since you haven't received an answer so far, and if you're still looking
for a solution, I'd try one of the .vba newsgroups (if you ask nicely
whether such timing troubles are known when using VBA, they might be
able to help you).

HTH
Robert
 
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.