We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

FieldLink SourceFullName change => losing \ after replacement

Hi Aspose team,

I am currently looping between Range.Fields and in case of FieldLink I want to change SourceFullName.

Replacement string is

C:\\Users\\Aspose\\Test\\_Za link exchange description.doc

After I make replacement (sample project is attached, also test document) I am getting following output:

d:\_Projects\Threads\WORD\PDF\bin\Debug>pdf
Opening document:11.10.2015 10:52:37
Document opened: 11.10.2015 10:52:37
Starting with changes: 11.10.2015 10:52:37
Change done: 11.10.2015 10:52:37
New SourceFullName: C:UsersAsposeTest_Za link exchange description.doc
Start document saving: 11.10.2015 10:52:37
Saving done: 11.10.2015 10:52:37


As you can see all \ are gone.
Btw. I tried same with VB.NET and also same problem.

Can you please check?

Thanks,
Oliver



Hi Oliver,


Thanks for your inquiry. Please assign the string value to SourceFullName property as follows:

fl.SourceFullName = @“C:\Users\Aspose\Test\_Za link
exchange description.doc”
;

<o:p></o:p>


I hope, this help.

Best regards,
Thanks.
In my sample app I am using C# but in my "real" app I am using VB.Net so I simply created
NewSourceFullName=NewSourceFullName.Replace("\","\\")

and that helped.




Hi Oliver,


Thanks for your feedback. It is great you were able to find what you were looking for. Please let us know any time you have any further queries.

Best regards,