Get current folder location - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Get current folder location

Last post 04-05-2019 01:07 AM by joubin. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-13-2018 07:37 AM

    • joubin
    • Not Ranked
      Male
    • Joined on 03-13-2018
    • Poland
    • Posts 10

    Get current folder location

     Hi,

    I want to export a current view to PDF, and save it to the location where the user currently opens the form from:

    this.CurrentView.Export(@"\" + fileName, ExportFormat.Pdf);

    unfortunately it does not work, any ideas? 

  • 04-03-2019 01:37 AM In reply to

    • joubin
    • Not Ranked
      Male
    • Joined on 03-13-2018
    • Poland
    • Posts 10

    Re: Get current folder location

    I tried something new, so the user can set a field with desired location.

     folderNode = MainDataSource.CreateNavigator().SelectSingleNode("/my:myFields/my:FolderLocation", NamespaceManager);

    But is there a way to populate it automatically? Based on which drive/folder the form was launched from. 

  • 04-05-2019 01:07 AM In reply to

    • joubin
    • Not Ranked
      Male
    • Joined on 03-13-2018
    • Poland
    • Posts 10

    Re: Get current folder location

     I think I found a solution now:

    this.Template.Uri;

    this.Uri;

    but to assign a string you need to use Path.GetFolderName() function. 

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.