ASPOSE 8 and Date Docvariables format

Last post 01-19-2010, 10:23 AM by aspose.notifier. 4 replies.
Sort Posts: Previous Next
  •  11-12-2009, 10:17 AM 207526

    ASPOSE 8 and Date Docvariables format .NET

    Attachment: Present (inaccessible)

    Hi,

    In ASPOSE 8 date formatting does not work. In ASPOSE 7 this feature was working correctly.

    The code is:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim objDoc As New Document("C:\before.doc")
    Dim strValor As String
    Dim strFecha As String
    Dim strTipo As String
    Dim strCodDateCo As String 

    System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("es-ES")

    Try

    objDoc.Variables.Item("VFECSOLIC") = Date.Today
    objDoc.Variables.Item("VFPRIMERPAGO") =
    "15/11/2009"
    objDoc.UpdateFields()

    objDoc.Save("C:\after.doc")

    Catch ex As Exception

    strValor = "0"

    End Try

    objDoc = Nothing

    End Sub

     

     
  •  11-12-2009, 11:15 AM 207543 in reply to 207526

    Re: ASPOSE 8 and Date Docvariables format

    Hi

     

    Thanks for your request. I cannot reproduce the problem on my side. I use the following code for testing:

     

    CultureInfo curentCulture = Thread.CurrentThread.CurrentCulture;

    Thread.CurrentThread.CurrentCulture = new CultureInfo("es-ES");

     

    // Create document.

    Document doc = new Document(@"C:\Temp\in.doc");

     

    doc.Variables["VFECSOLIC"] = DateTime.Today.ToShortDateString();

    doc.Variables["VFPRIMERPAGO"] = "15/11/2009";

    doc.UpdateFields();

     

    // Save output docuemnt.

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

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

     

    Thread.CurrentThread.CurrentCulture = curentCulture;

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  11-13-2009, 3:00 AM 207673 in reply to 207543

    Re: ASPOSE 8 and Date Docvariables format

    I have executed your code in ASPOSE8 NET2.0 version in Visual Studio 2005 and it works correctly but when I have tried to execute the SAME code in ASPOSE8 NET1.1 it doesn't work.

    Try to execute your code in Visual Studio 2003 with ASPOSE8 NET1.1...

     

     
  •  11-13-2009, 3:19 AM 207677 in reply to 207673

    Re: ASPOSE 8 and Date Docvariables format

    Hi

     

    Thank you for additional information. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.

     

    Best regards,


    Andrey Noskov
    Developer/Technical Support
    Aspose Auckland Team
     
  •  01-19-2010, 10:23 AM 217927 in reply to 207526

    Re: ASPOSE 8 and Date Docvariables format

    The issues you have found earlier (filed as 11419) have been fixed in this update.


    This message was posted using Notification2Forum from Downloads module by aspose.notifier.
    (71)
     
View as RSS news feed in XML