Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Brett Shearer Brett Shearer is offline
external usenet poster
 
Posts: 1
Default Automation returns incorrect data (Threading.Thread.Sleep fixes)

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);
}
}

  #2   Report Post  
Posted to microsoft.public.word.tables
Robert M. Franz (RMF) Robert M. Franz (RMF) is offline
external usenet poster
 
Posts: 1,741
Default Automation returns incorrect data (Threading.Thread.Sleep fixes)

Hi Brett

Brett Shearer wrote:
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);
}
}


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
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I preserve the line returns when saving as xml data? Yufei Microsoft Word Help 1 October 5th 06 11:43 AM
Mail merge returns "0" where I want data instead Liltingbelle Mailmerge 1 September 21st 06 06:11 AM
Cannot find datasource George Microsoft Word Help 3 July 22nd 06 03:38 PM
Incorrect data being merged Hills Mailmerge 0 July 5th 05 04:45 PM
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 05:10 AM


All times are GMT +1. The time now is 11:32 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"