code from discussions, pastes double spaced in SAS

Reply
Valued Guide
Posts: 2,177

code from discussions, pastes double spaced in SAS

now I've discovered how to paste (enhanced editor-) formatted programs into the discussion editor (via ms-office-word), there remains one interesting step.....

When copying formatted code out of the discussion window back into a SAS editor, how can I eliminate the effect that the code in SAS appears double line spaced? 

I would be quite happy as an intermediate step, with a simple command in SAS or even some change procedure/performance in Word.

anny offers?

peterC

Respected Advisor
Posts: 3,799

code from discussions, pastes double spaced in SAS

Try reversing SAS/WORD/FORUM and use FORUM/WORD/SAS. 

This Forum don't know SAS.

PROC Star
Posts: 7,487

code from discussions, pastes double spaced in SAS

Posted in reply to data_null__

Or does it mean that the world MUST revolve around MS?

Valued Guide
Posts: 2,177

code from discussions, pastes double spaced in SAS

Posted in reply to data_null__

data_null_;

in my environment win-vista32, ie9 and ms-office2007-word the clip of formatted code from communities, pastes into word with no indentation, but formatted as "bullet" and otherwise "normal".

in your environment, does the pasting "FORUM/WORD/SAS" retrieve the indentation and other formatting ?

peterC

Super Contributor
Posts: 273

code from discussions, pastes double spaced in SAS

Hi everyone     (firefox word 2010 sas9.2.3)

I tried with your colored code from an recent exchange " Facing error while ....PIPE"

in word2010  i have only just after having past your code to change the style from normal to the next choice without intervalline

to obtain a compact but indented code

then the copy to sas is working well

For Art

i tried to open office  writer

but this pasting operation reveals that the is a gray invisible zone at the beginning of some lines

and then the copy to sas  makes that this code correct is NOT recognized by sas  (not colored).

true for datanull or Peter code

HTH

Andre

Respected Advisor
Posts: 3,799

Re: code from discussions, pastes double spaced in SAS

Yes, if the code has syntax highlighting I get the highlighted syntax with no extra lines but the code is "bulleted?"

When copied and pasted directly to EE the bullet is also copied etc....

You would need to remove the bullet with the bullet menu which looks like it will mess up the indentation but if you just select all and copy the indentation looks mostly the same as in the forum.  Depends on font used in forum.

If you use FORUM/WORD(BULLET NONE)/SAS EE technique to copy this message http://communities.sas.com/message/103132#103132 which is indeted using 3 spaces, that don't show up in the post when the code is returned to SAS it shows up indented as I wrote it.  If I remember to set the font Courier when I post the code the indentaion will look right in the forum.

Ask a Question
Discussion stats
  • 5 replies
  • 266 views
  • 0 likes
  • 4 in conversation