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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Change existing styles, not adding new ones

Thread ID:

Created:

Updated:

Platform:

Replies:

72042 Feb 28,2008 03:34 AM UTC Feb 29,2008 09:44 AM UTC WinForms 1
loading
Tags: DocIO
Michael
Asked On February 28, 2008 03:34 AM UTC

I'm writing a small utility to update the styles within a series of documents and templates to be consistent with a master document.

I'm aware of the Add() method on the styles collection, however I'm interested in doing something like:
foreach (Style myStyle in document.Styles)
myStyle.CharacterFormat.Bold = ...
to a series of templates.

However after I have saved these .dot files the changes are not carried across.

Also I need to change the default paragraph font in these documents. Any suggestions ?

I'm using the 6.1 DocIO library.


Administrator [Syncfusion]
Replied On February 29, 2008 09:44 AM UTC

Hi Michael,

Sorry for the delay in responding.

1.However after I have saved these .dot files the changes are not carried across.

I am not able to reproduce the issue that you mentioned here. I have created a simple sample with paragraph styles and change it as dot file, the styles are applied.

Here is the sample:
http://websamples.syncfusion.com/samples/DocIO.Windows/72042-f/main.htm

2.Also I need to change the default paragraph font in these documents. Any suggestions ?

You can change the default paragraph font by using the following code snippet:


[C#]
// Create Paragraph styles
style = document.AddParagraphStyle ( "MyStyle_Normal" );
style.CharacterFormat.FontName = "Bitstream Vera Serif";
style.CharacterFormat.FontSize = 10f;
style.CharacterFormat.TextColor = Color.FromArgb ( 0 , 21 , 84 );

// Applying style to the current paragraph.
paragraph.ApplyStyle ( "MyStyle_Normal" );



Please refer the sample in the below link which illustrates the above:
http://websamples.syncfusion.com/samples/DocIO.Windows/F-72042/main.htm

Please try this and let me know if this helps.

Regards,
G.Yavana




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

;