Hello everyone,
I am getting the following error while working with a word file through c#.
In my program i m reading the file line by line and doing some manipulations.
This error is occuring anywhere its not fix to a particular line.
Context 0x1fc458' is disconnected. Releasing the interfaces from the current context (context 0x1fc2e8).This may cause corruption or data loss. To avoid this problem, please...
User Profile
Collapse
-
Code:for (i = 1; i <= doc.Sentences.Count; i++) { if (doc.Sentences[i].InlineShapes.Count > 0) { InlineShape il = doc.Sentences[i].InlineShapes[1]; float height = il.Height; float var = 19.7f; if (height == var) { MessageBox.Show("Match Found"); } } }
-
The exception is as follows:
{System.Runtime .InteropService s.COMException (0x800A1066): Command failed
at Microsoft.Offic e.Interop.Word. InlineShape.get _Height()
at BookmarkText.Fo rm1.scanWholeDo cument() in F:\BookmarkText \BookmarkText\F orm1.cs:line 220}Leave a comment:
-
for (i = 1; i <= doc.Sentences.C ount; i++)
{
if (doc.Sentences[i].InlineShapes.C ount > 0)
{
InlineShape il = doc.Sentences[i].InlineShapes[1];
float height = il.Height;
float var = 19.7f;
...Leave a comment:
-
ya i am sure its always being assigned with a value because i first check if there is an inline shape or not.if i get an inline shape then only further processing is done.
Thanks.
Malvika.Leave a comment:
-
InlineShape.Height throws exception "Command Failed"
Hi Everyone,
Please go through the code below:
InlineShape il = doc.Sentences[i].InlineShapes[1];
float height = il.Height;
The second line is some times working fine but at times it throws an exception "Command Failed".
Kindly help me in this.
Thanks,
Malvika. -
Find highlighted text in word doc
Hi everyone,
I want to find the text which is highlighted with a particular colour in a word document.
Thanks,
Malvika. -
Malvika Shrivastava started a topic How to identify the background colour of a sentence in a word documentin C SharpHow to identify the background colour of a sentence in a word document
Hi,
I have a word document in which I have a sentence which is inclosed by an outer border and the inner part is filled with some colour.
Now i have to identify the background colour of that sentence through c#.
I am using Microsoft.Offic e.Interop.Word for this.
Kindly help.
Thanks in advance. -
How can we play swf files and write on them while playing
Hi Everyone,
Can anyone help me with this. I have a requirement in which i have to play a swf file and i also want to write on it while playing.Means it should work as a tutorial in which notes will be played on background and we can write on them to explain any point.
Thanks. -
Identifying filled circles in a scanned image
Hi everybody.
I have a feedback form that I scan into an image. My user fills some circles in this feedback form using black ink. Every form has some rows with suppose five circles each and the user fills only one circle for each row.
I can't think of a way of how to locate which circle was filled.
Can anybody please give me an advice on this?
Thanks.
No activity results to display
Show More
Leave a comment: