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. Image for the cookie policy date

How to insert files in document

Hi All,

I am using Essential DocIO 4.4.0.51 for creating word documents Please provide the codes lines for inserting the files in to document.

Thanks in advance,
Rambabu




11 Replies

GM Geetha M Syncfusion Team November 7, 2008 12:08 PM UTC

Hi Rambabu,

Could you please clarify me if you are trying to insert the contents of a file say, a text file or the file itself as a object?

Inserting files as object is not supported by Essential DocIO.

Regards,
Geetha



RP Rambabu Pusala November 10, 2008 04:22 AM UTC

Hi Geeta,

I want to insert a 2 pages of word documents in to another word document. By using "CloningandMerging" sample
Implemented in my project, but the problem is the document contains 2 pages of contents with first page has page break at end.
and second page starting with "Text wrapping break"
The final merged document contains all the first pages only.
The given sample adding the contents as section by section. We have any chance to add page by page.
In which version we have this feature. Please provide solution as early as possible.

Thanks,
Rambabu.



BP Bhuvaneswari P Syncfusion Team November 10, 2008 11:14 AM UTC

Hi Rambabu,

Thanks for the details.

Could you please use the ImportContent() method of document object. This will merge the document into the end of designation document.

doc.ImportContent(doc1)

If this is not helps you, could please provide your documents and expected output document. This would be helping us to provide a solution.

Best Regards,
Bhuvana




RP Rambabu Pusala November 10, 2008 01:34 PM UTC

Hi Bhuvana,

Thanks for reply, I am using Essential DocIO 4.4.0.51. In this version I don't think we have this feature.
Please find the attached one. Before merging the documents, by using this template substituting the actual values
and preparing the required set of documents. That set of documents are schedule for merging.

The actual problem is after merging the document contains all first pages of the all individual files.
Please provide solution as early as possible.


Thanks,
Rambabu.



Template_5c83c997.zip


BP Bhuvaneswari P Syncfusion Team November 11, 2008 07:32 AM UTC

Hi Rambabu,

Thanks for the template and details.

I am afraid that I am unable to reproduce the issue in the given version, the page breaks are inserted properly after cloning and merging the documents. Tested environment: Windows XP with Service pack2, Office 2003 with sp3 and Office 2007, Visual Studio 2005, .Net Framework 2.0 and Essential Studio version 4.4.0.51.

Here is the test sample in version 4.4.0.51.
http://websamples.syncfusion.com/samples/DocIO.Windows/F77577/main.htm

Please take a look into the sample and modify the sample to reproduce the issue in our end and also provide the system details and Office version to reproduce and investigate more on this issue.

Best Regards,
Bhuvana



RP Rambabu Pusala November 11, 2008 10:11 AM UTC

Hi Bhuvana,

Thanks for reply; the given sample is not downloading in to my system.
My system environment: Windows XP with Service pack2, Office 2003,
Visual Studio 2003, .Net Framework 1.1 and Essential Studio version 4.4.0.51.

I try to merge the Template1.doc, Template2.doc and Template3.doc in to Template.doc
I found one issue i.e., after editing the individual documents means before merging.
Example
"Template1.doc" has 23 KB size, I just open the document and I clicked the save button then
the size of the document has 33 KB. I follow the same steps for all input documents like Template2.doc, Template3.doc ....

Then the final merged document contains all the first and second pages also means we have no problem.
Is there any mistake in saving the document?

The code snippet as:

IWordDocument wordDoc = new WordDocument();
wordDoc.Open(destinationTemplateFile, FormatType.Doc);

wordDoc.Replace(findWhat, replaceWith, true, true);
......
......
wordDoc.Save(docName, FormatType.Doc);


Thanks,
Rambabu





BP Bhuvaneswari P Syncfusion Team November 12, 2008 04:04 AM UTC

Hi Rambabu,

Thanks for the details.

Please download the sample from the below link:
http://websamples.syncfusion.com/samples/DocIO.Windows/F77577/main.htm

Could you please send your sample with documents to reproduce the issue in our end, this would help us to find the cause of the issue soon and provide a solution.

Best Regards,
Bhuvana




RP Rambabu Pusala November 12, 2008 07:02 AM UTC

Hi Bhuvana,

Thanks for reply, Problem is solved. Just the document contents are copied into some other new document.
That new document is using as the input template.

In my project, we have one more document with one page contents.

The flow steps for using this document are:

1. Copying the source template to destination location.
2. Editing the resultant document.
3. Fax the exported document.

The given sample illiterate the steps.

And the problem is also explained as comments.

Thanks,
Rambabu






SyncRegTester_e8503498.zip


BP Bhuvaneswari P Syncfusion Team November 13, 2008 12:57 PM UTC

Hi Rambabu,

Thanks for the update.

We are working on this issue and will update you the details by Monday.

Thank you for your patience.

Best Regards,
Bhuvana




RP Rambabu Pusala November 24, 2008 08:12 AM UTC

Hi Bhuvana,

Its been one week already since we reported the issue, when can we get the fix for the same.

Thanks,
Rambabu



BP Bhuvaneswari P Syncfusion Team November 25, 2008 12:58 PM UTC

Hi Rambabu,

Sorry for the delay in responding.

We have tested this issue using the FAX viewer and printer,but we are unable to reproduce the issue. But we are trying to reproduce the issue in the FAX machine. Once we reproduce the issue from our end, we will update you with exact time frame.

Best Regards,
Bhuvana


Loader.
Live Chat Icon For mobile
Up arrow icon