Hyperlink FilePath losing the slashes

When i try to set Hyperlink.FilePath to a shared file location it is losing the forward slash. Because of this the hyperlink formation is not correct in the word Doc.
I am using a .NET C# Console App
Here is the code i use:
Hyperlink hyperlink = new Hyperlink(entity as WField);
hyperlink.FilePath = @"\\\\domainname\\FolderName\\FileName";

But the FilePath loses the first \\\\ as soon as it is set.
What am i doing wrong.

1 Reply 1 reply marked as answer

HC Hemalatha Chiranjeevulu Syncfusion Team January 27, 2021 07:01 PM UTC

Hi Niranjan,

Thank you for contacting Syncfusion support.

We have tried to reproduce the reported problem using the given details, but it works properly at our end. For your reference, we have attached the sample application which is used to reproduce the problem and it can be downloaded from the below link:
https://www.syncfusion.com/downloads/support/forum/161880/ze/SampleApplication1959593211

We suspect that the reported problem might be due to the code snippets which used at your end. So, could you please share us the sample or modified sample of above along with the input document
. Thereby, we can proceed further to analyze and update you with the appropriate details.

Please refer the below UG documentation to know more about hyperlink:
https://help.syncfusion.com/file-formats/docio/working-with-paragraph#working-with-hyperlinks

Please let us know if you have any other questions.

Regards,
Hemalatha C

 


Marked as answer
Loader.
Up arrow icon