Own name for word document created by style sheet

RogerRoger Member Posts: 57
edited 2011-04-04 in NAV Three Tier
Hi,

I'm using codeunit 682 for creating word documents based on a style sheet. All works fine, except one thing.

If the RCT is downloading the created document, the name of this are a system generated one in the temporary directory whith the extension NAVw.

If want to give the new documents a name defined by myself, but I have no idea how I can that. All of my changes in codeunit 682 results courrupted files.

Does anyone have an idea for me? It would be great! :D
Many thanks, Roger

Answers

  • RogerRoger Member Posts: 57
    Meanwhile, I found a solution

    Codeunit 682, Function LoadStyleSheetDataRTC
    A new parameter '_DucumentName' is needed there.
      // -@01
      { Orig.
      NAVFilename := "3TierAutoMgt".ServerTempFileName('','NAVw');
      ApplicationXML.save(NAVFilename);
      DOWNLOAD(NAVFilename,'Style Sheet Documents','',' All Files (*.*)|*.*',NAVFilename);
      }
      IF _DocumentName = '' THEN BEGIN
          NAVFilename := "3TierAutoMgt".ServerTempFileName('','NAVw');
          ApplicationXML.save(NAVFilename);
          DOWNLOAD(NAVFilename,'Style Sheet Documents','',' All Files (*.*)|*.*',NAVFilename);
      END
      ELSE BEGIN
        ApplicationXML.save(_DocumentName);
      END;
      // +@01
    
    Many thanks, Roger
Sign In or Register to comment.