Application.DataToClip(alias(),reccount(),3) >_cliptext = strtran(_cliptext,chr(9)+chr(13),chr(13)) >_cliptext = strtran(_cliptext,chr(13)+chr(13),chr(13)) >do while occurs(" "+chr(9),_cliptext)>0 > _cliptext = strtran(_cliptext," "+chr(9),chr(9)) >enddoI've done this for Excel - and discovered that _vfp.datatoclip has its limitations. Not only the padding spaces, but some other things which formatted the data in a way I didn't like, so I wrote something likethis:
#define cTab chr(9) #define cr chr(13) scan _outtext=_outtext+Trim(field1)+cTab _outtext=_outtext+ctod(datefield)+ctab _outtext=_outtext+mline(memofield,1)+ctab _outtext=_outtext+alltr(str(nField,11,2))+cr ends _cliptext=_outtext [ paste into excel now]It works like a charm - all the formatting is done in VFP, and I was actually shocked to understand that VFP has stronger string functions than Word 97 (or Excel, for that matter). I mean, Word should be a text> processing oriented tool.