Hi,
The below code is working well in my local machine, but when I upload and test it in a Windows server 2003 (web server) , it is not merging the document.
1 System.Windows.Forms.RichTextBox rTxt1 = new System.Windows.Forms.RichTextBox();
2 System.Windows.Forms.RichTextBox rTxt2 = new System.Windows.Forms.RichTextBox();
3
4 if (strWordContent == "")
5 {
6 strWordContent = strMyNewWordContent;
7 strFinalWordContent = strWordContent; //Assign the value to the final variable
8 }
9 else
10 {
11 rTxt2.Rtf = strFinalWordContent; //Get the value from the final variable and store it in a 2nd RTF editor
12 strWordContent = strMyNewWordContent;
13
14 rTxt1.Rtf = strWordContent;
15 string str = rTxt1.Rtf.ToString();
16 int index = str.LastIndexOf('}');
17 string str1 = str.Insert(index, "\\page\\par\r\n"); //Adding the page break
18 rTxt1.Rtf = str1;
19
20 rTxt1.SelectAll();
21 rTxt1.Copy();
22 rTxt2.Paste(); //Copy and paste it in the second document.
23
24 strFinalWordContent = rTxt2.Rtf; // Get the content form 2nd RTF to final variable
25
26 rTxt2.Clear();
27 rTxt1.Clear();
28 }
My Server Details:
Dot Net Version : 3.5
OS : Windows Server 2003
Office Version : MS Office 2003
Platform : ASP.Net with C#
Application Type : Web application
After statement rTxt2.Paste() is excuted , the previous values is presented in the rTxt2. (the copy and paste command is not working)
Please help on this.
Thanks & regards,
Navaneethakrishnan T