Sign In  Sign Up Live-Chat

file save to a directory programmatically

Last post 06-23-2008, 9:13 AM by alexey.noskov. 3 replies.
Sort Posts: Previous Next
  •  06-19-2008, 1:14 PM 132162

    file save to a directory programmatically

    I need to save the output of a mail merge operation to a specific directory EG "C:/temp/" programmatically.

    I have not been able to find any documentation on this.

    We have been using your product for at least 2 years and I am new here trying to make the operation more user friendly.

    Thanks in advance for your help.

     


    This message was posted using Page2Forum from Technical Tips - Aspose.Words for .NET and Java
     
  •  06-19-2008, 3:05 PM 132177 in reply to 132162

    Re: file save to a directory programmatically

    Hi

     

    Thanks for your inquiry. You should just put full path into the Save method. See the following code.

     

    doc.Save(@"C:\Temp\out.doc");

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  06-23-2008, 8:41 AM 132562 in reply to 132177

    Re: file save to a directory programmatically

    Thank you but I read that.

    This is my command line :

    doc.Save(fileNameMerge, Aspose.Words.SaveFormat.FormatDocument, Aspose.Words.SaveType.OpenInWord, this.Response);

    In FileNameMerge is the following "c:\\temp\\filename.doc".

    It returns an error message that "Filename should not contain path."

    Please advise.

    Thanks

    Joe Winkiel

     
  •  06-23-2008, 9:13 AM 132565 in reply to 132562

    Re: file save to a directory programmatically

    Hi

     

    Thank you for additional information. This is impossible. You can’t specify path when you save document to client browser. This is by design of HTTP protocol. When you send a file via HTTP you can just specify file name, then end-user will specify where he (she) would like to save document.

    By default this file will be stored in browser’s temporary folder.

     

    Best regards.


    Alexey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
View as RSS news feed in XML