We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to insert the full .doc into another .doc

Thread ID:

Created:

Updated:

Platform:

Replies:

79757 Feb 24,2009 09:20 PM UTC Mar 3,2009 10:39 AM UTC ASP.NET Web Forms (Classic) 9
loading
Tags: DocIO
Matthew Herb
Asked On February 24, 2009 09:20 PM UTC

void InsertWorkItems(IWordDocument wdMaster)
{
WordDocument wd1 = new WordDocument("C:\\docs\\6_C.docx", FormatType.Docx);

wdMaster.Replace("", wd1, false, false, true );



should work right? But I get a object reference not set error even though neither DOC object is null.. ??







Bhuvaneswari P [Syncfusion]
Replied On February 25, 2009 09:24 AM UTC

Hi Matt,

Thank you for your interest in Syncfusion products.

I am afraid that I am unable to reproduce the issue "while replacing the string with document it throwing an exception", its working fine in our end.

Please refers to the below sample:
http://www.syncfusion.com/uploads/redirect.aspx?file=FindandReplace_c68f9916.zip&team=support

Please have a look into the sample and try to reproduce the issue in that sample or send your sample to us to reproduce the issue. This would be very helpful for us to investigate more on this issue and provide a solution.

Note: In subject you have mentioned .doc and in code you have used .docx. But issue is not reproduced in both the formats.

Best Regards,
Bhuvana



Matthew Herb
Replied On February 25, 2009 04:16 PM UTC

ok.. thanks it works now.. Not sure what I was doing wrong before.

Another question while I am here

is there some way to surround parts of text in a document so I can remove certain parts..

In my example the user checks which sections he wants to include and I create the document with those sections..

the workaround I am doing instead is breaking the sections into seperate .doc files and then adding them in a main .doc file..




Matthew Herb
Replied On February 25, 2009 07:24 PM UTC

Found a bug in DOCio it seems.. took me hours..

The problem I was having all was because of a certain type of textbox in Word 2007. Causes

wdMaster.Replace("", wdD, false, false, true);

to error.. I will attach the piece that causes the problem.. without it everything works fine





dd_de2df14e.zip

Matthew Herb
Replied On February 25, 2009 11:22 PM UTC

it is 'smartart' that causes the problem.

DocIO cannot use smartart ?


Bhuvaneswari P [Syncfusion]
Replied On February 26, 2009 11:50 AM UTC

Hi Matt,

Thanks for the instant update.

Currently we do not provide support for preserve or create or manipulating smart tag documents using Essential DocIO.

We have logged feature request regarding this. We will get back to you once the feature is implemented.

Best Regards,
Bhuvana


Matthew Herb
Replied On February 26, 2009 03:50 PM UTC

what solution woudl you recommend?

Only thing I coudl find that works is to save as WORD 2003. But the problem with that is it shrinks the pictures and one instace the text seemed to dissapear .


Bhuvaneswari P [Syncfusion]
Replied On February 28, 2009 10:43 AM UTC

Hi Matt,

Thanks for the update.

I afraid that I am unable to reproduce the issue when we using the doc format. It’s working as expected for doc format. The textbox is not shrinks and the texts are not disappeared.

Here is the sample for your reference:
http://www.syncfusion.com/uploads/redirect.aspx?file=Replace_35d90d6.zip&team=support

Please have a look into that sample and could you please send your modified sample with source document to reproduce the issue in our end. This would be helpful for us to investigate the issue further.

Best Regards,
Bhuvana



Matthew Herb
Replied On March 2, 2009 08:30 PM UTC

I ended up just keeping it docx format and ussing the snipping tool to capture the smartart and repaste it in


Bhuvaneswari P [Syncfusion]
Replied On March 3, 2009 10:39 AM UTC

Hi Matt,

Thanks for the update.

We will get back to you once the smart tag feature is implemented.

Best Regards,
Bhuvana


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;