O
Omatase
I'm writing some code against the Word object model to add a table to
some word documents. I have tens of thousands of these files that need
these tables added to them. Here is some code that shows me adding the
table as well as setting some properties on the table to adjust how it
looks:
Range tableLocation = aDoc.Range(ref start, ref start);
theTable = aDoc.Tables.Add(tableLocation, 1, 3, ref missingValue, ref
autofitBehavior);
theTable.LeftPadding = 0.0f;
theTable.RightPadding = 0.0f;
// eliminate table borders
theTable.Borders.Enable = 0;
Every once in a while (it appears to be random) I get en error thrown
on this line:
theTable.LeftPadding = 0.0f;
The error is:
The server threw an exception. (Exception from HRESULT: 0x80010105
(RPC_E_SERVERFAULT))
I don't get this error consistently. I can run the same code on the
same document immediately after the failure and it works. Can anyone
help with this?
some word documents. I have tens of thousands of these files that need
these tables added to them. Here is some code that shows me adding the
table as well as setting some properties on the table to adjust how it
looks:
Range tableLocation = aDoc.Range(ref start, ref start);
theTable = aDoc.Tables.Add(tableLocation, 1, 3, ref missingValue, ref
autofitBehavior);
theTable.LeftPadding = 0.0f;
theTable.RightPadding = 0.0f;
// eliminate table borders
theTable.Borders.Enable = 0;
Every once in a while (it appears to be random) I get en error thrown
on this line:
theTable.LeftPadding = 0.0f;
The error is:
The server threw an exception. (Exception from HRESULT: 0x80010105
(RPC_E_SERVERFAULT))
I don't get this error consistently. I can run the same code on the
same document immediately after the failure and it works. Can anyone
help with this?