Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Sep 17, 2012 2:42 pm

Hi,
I found a problem when I try to apply a style to a paragraph.

Start by explaining briefly the scenario: dynamically with Sharepoint take a word document already exists, and using Spire.Doc I open it and compete in the missing parts. Then complete all the different parts without any problems. But when I create the final chapter (number 11) and insert the title of the chapter by applying the style "Heading 2", I realized that the style Heading 3 (Chapter 3, in the practice of another previous section) is changed dynamically with a different font and size.

I have attached a diagram of this process.

Why if I use
Code: Select all
paragraph.ApplyStyle(BuiltinStyle.Heading2);


in Chapter 11 (and section 13) change styles in Chapter 3 (and Section 2)? I do not understand why. Thank you.

emailregistrazioni
 
Posts: 11
Joined: Sun Sep 18, 2011 9:32 pm

Tue Sep 18, 2012 9:09 am

Dear emailregistrazioni,

Thanks for your inquiry.
About your problem, we have done a test, but we don't reproduce your problem, could you provide us your test document? So that we can reproduce your problem and solve it quickly. Thanks.

Thanks and Regards,
Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Sun Sep 23, 2012 8:56 pm

Hi,
I have attached the requested document.

The numbers of chapters do not coincide with my previous example, pointing you where to look: I open the document and eith the library Spire.Doc create the Chapter 18. But when I open the generated document I realize that the paragraphs on page 15 (5.4.1, 5.4.2, 5.4.3,5.4.4,5.4.5,5.4.6,5.4.7,5.4.8 ) has been changed from font-Size 12 to 10, and Font-Family from Trebouchet to Calibri.

if i delete the line

Code: Select all
paragraph.ApplyStyle(BuiltinStyle.Heading2);


everything works perfectly.

Thank you

emailregistrazioni
 
Posts: 11
Joined: Sun Sep 18, 2011 9:32 pm

Mon Sep 24, 2012 10:30 am

Dear emailregistrazioni,

We have done a test, but we don't reproduce your problem, we use spire.doc(v4.4.30.3040).dll, spire.license(v1.2.2.40).dll for .net4.0 in Spire.Doc Pack (Hot Fix) Version:4.4.30, you can download Spire.Doc Pack (Hot Fix) Version:4.4.30 from the link http://www.e-iceblue.com/Download/download-word-for-net-now.html and have a try.
If you still have the problem, please tell us, and provide us more code. Thanks.

Thanks and best regards,
Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Wed Sep 26, 2012 11:54 am

Hi,
I downloaded the latest updates to do as I have said, I downloaded the following:

- Spire.doc_4.4 (installation file)
- Spire.doc_standard_4.4.26 (installation file)
- Spire.doc_hotfix_4.4.30 (dll)

honestly I went a little 'confused by what order to install them...

I tried to install spire.doc_standard_4.4.26, placing DLL in the GAC and reference to my project (dll ... e-iceblue/Spire.Doc Standard Edition/BIN/3.5). Export to DOC, but when I try to open it gives me error "cannot open file". If instead I try to open it with another software (open office) opens it perfectly. With the old version worked perfectly.

Then I tried to install the dock pack spire.doc_4.4 but the result is the same.

What could be the reason? thanks

emailregistrazioni
 
Posts: 11
Joined: Sun Sep 18, 2011 9:32 pm

Thu Sep 27, 2012 3:16 am

Dear emailregistrazioni,

We have done a test with spire.doc_standard_4.4.26, the generated doc file works fine. Our test steps, please refer to them and have a try. If you still have the problem, please tell us.
1. Creat a .net3.5 project
2. Open Add Reference, import spire.doc(v4.4.26.53035).dll, spire.license(v1.2.2.35).dll in ../ Spire.doc_standard_4.4.26/BIN/NET3.5 to it.

Best regards,
Amy
e-iceblue support
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc