1 Reply Latest reply: May 28, 2014 9:33 AM by Jose Tos RSS

    Using Macro to export to Excel converts my text to numbers!  Need Text!

      Send to Excel I get this which is what I want:

       

      852111581301575510575246314

       

      Using Macro I get this:

       

      8.52111581301575E+26

       

      how do I get the macro to force it to text?

        • Re: Using Macro to export to Excel converts my text to numbers!  Need Text!
          Jose Tos

          If you have that number in a TextObject you could use this:

           

          Set z = ActiveDocument.GetSheetObject("TXyourtextID")

            z.CopyTextToClipboard

            wrksht.Range("A1").Select

            wrksht.paste

           

          Or you could set a variable with your value and the use this at the macro to get the value as String:

          varValue = ActiveDocument.Variables("yourVariableWithTheValue").GetContent.String

           

          There are a few ways to do it, just try or search "convert to string vbs" in google

           

          Hope this helps, regards