Issue in the VBA macro of MS word.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priby
    New Member
    • Feb 2008
    • 1

    Issue in the VBA macro of MS word.

    Greetings to all,

    I am new to VB. In my VBA macro I am trying to access a data source(a text file) using the below code snippet.


    Dim TESTING As String

    ..
    ..


    TESTING = "M_1111"

    Selection.TypeT ext Text:=vbCrLf & "TESTING" & _
    vbCrLf & .DataFields(TES TING) & vbCrLf & _
    "END OF TESTING" & vbCrLf



    When I run the code, I am able to get the value of M_1111 from the data source(which is a text file) . But the problem is that, if the value of M_1111 has more number of characters(more than around 200 characters), the value gets truncated.


    I don't know why this truncation is happening. Is there any maximum for the number of characters that can be accessed?

    Any help appreciated.

    Thanks
    priby
Working...