I have word document in that Use superscript to insert ® symbol and No superscript needed for ™ symbol

Kindly consider below Input and Expected_output. Kindly help me asap.

Input - TM (Symbol)
Expected_output -™ (Subscript)

Input - ® (Symbol)
Expected_output - ® (Subscript)

@Manasahr Could you please attach your input and expected output documents here? We will check them and provide you more information.

Kindly find the below input and expected output word document.
Expected_output_superscript.docx (12.1 KB)
Input_ superscript.docx (12.1 KB)

@Manasahr You can use code like this to achieve what you need:

Document doc = new Document(@"C:\Temp\Input_ superscript.docx");

FindReplaceOptions opt = new FindReplaceOptions();
opt.ApplyFont.Superscript = true;

doc.Range.Replace("²", "2", opt);

doc.Save(@"C:\Temp\out.docx");

Regarding ® and TM you can use a similar technique technique:

FindReplaceOptions opt = new FindReplaceOptions();
opt.ApplyFont.Superscript = true;
doc.Range.Replace("®", "®", opt);

I want to expected output should be Superscript kindly find the below screenshot help me asap.

Any updates on it.

Kindly update asap.

@Manasahr The code I have provided in my previous answer does exactly this. Could you please check the output document produced by the provided code?

Kindly find below output I am getting.
image.png (20.1 KB)

@Manasahr The following code produces the expected output on my side:

Document doc = new Document(@"C:\Temp\Input_ superscript.docx");

FindReplaceOptions opt = new FindReplaceOptions();
opt.ApplyFont.Superscript = true;

doc.Range.Replace("®", "®", opt);

doc.Save(@"C:\Temp\out.docx");

Input_ superscript.docx (12.0 KB)
out.docx (9.4 KB)