web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Illegal Characters in Path

(0) ShareShare
ReportReport
Posted on by

Hello,

I am trying to open a file but I am getting error saying Illegal characters in PATH.

I am expecting system to go to server's Desktop folder. Although, I have SomePdfFile.pdf on both Server and Client's Desktops.

My code:

myPathVariable := 'C:\Users\muUserName\Desktop\SomePdfFile.pdf';

File.Open(myPathVariable); //results in illegal character in PATH error message.

Any suggestion?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,304 Super User 2026 Season 1 on at

    It will go to the user client's desktop, not the server. If you want to open the server's path, you need to share the folder and do \\server\path\file.pdf

  • Community Member Profile Picture
    on at

    I have the same file on Client's Desktop too. But still getting the error.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,304 Super User 2026 Season 1 on at

    Is C:\Users\muUserName\Desktop\SomePdfFile.pdf exist on that desktop ?

    I am assuming muUserName is not the real username.

  • Suggested answer
    RockwithNav Profile Picture
    9,015 Super User 2026 Season 1 on at

    Where exactly the cursor is  breaking while debugging?

    Seems to be some path related issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
TAHER_El_Mehdi Profile Picture

TAHER_El_Mehdi 2

#1
sliderxb Profile Picture

sliderxb 2

#1
broberts Profile Picture

broberts 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans