The "unexpand" binary, (eg executable for Window folks), is located in 
/usr/bin/ in Fedora 2.6.34.6-54.fc13.x86_64, which I'm running, and I'm 
not sure there's a Windows equivalent.

Regards,

LelandJ


On 09/11/2010 12:16 PM, Leland Jackson wrote:
>    You might give the below perl script a try.  If you named the script
> "spaces_to_tabs.pl", you would call it with the path to the input file
> and path of the file to output as augments.  For example:
>
> perl spaces_to_tabs.pl /home/leland/data1.txt /home/leland/data2.txt
>
> #------------------  spaces_to_tabs  ------------------------------
> #!/usr/bin/perl
>
> use Text::Tabs;
> # set number of spaces to tabify
> $tabstop = 5;  # default = 8
>
> # pass input file to script
> $infile = $ARGV[0];
>
> # pass output file to script
> $outfile = $ARGV[1];
>
> open (INFILEHANDLE, "<  $infile") or die ("Cannot open input file");
> open (OUTFILEHANDLE, ">  $outfile ") or die ("cannot open out file");
>
> binmode OUTFILEHANDLE;
>
> while (defined($line =<INFILEHANDLE>))
> {
>
>         $line = expand($line);
>         print OUTFILEHANDLE unexpand($line);
>
> }
>
> exit;
>
> #-------------------------------------------------------------------
>
> Regards,
>
> LelandJ
>
>
>
>
> On 09/10/2010 10:07 PM, Malcolm Greene wrote:
>> Hi Mike,
>>
>>> Is this what you are trying to do?
>>> http://www.computing.net/answers/office/transfering-tabs-word-to-notepad/5981.html
>> No. That example shows how to export Word content indented with tabs.
>> I'm asking how to export Word content with tabs based on the indentation
>> property set on each paragraph, eg. there are no tabs in my source
>> documents - just paragraphs of various indentations. I'm sure I can do
>> this via VBA but was hoping for an out-of-the-box solution.
>>
>> Thanks for taking a shot at this for me.
>>
>> Malcolm
>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to