Jump to content
Sign in to follow this  
Klark67

Line problem

Recommended Posts

Klark67

Local $sString =

("

line1

line2

")

can I divide it like list(with lines) ?

Share this post


Link to post
Share on other sites
water

You have already asked a similar question Please open only one thread per question.

And the answer is: No, you can't.

You can either have a string and concatenate the content with operator "&" or an array.

It depends on the program you want to automate and the way it expects data.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
Klark67

mmm. Im sorry about that , I understand . it is impossible :oops:

Share this post


Link to post
Share on other sites
JLogan3o13

You'd have to use the & _ as Water mentioned, but you could do something like this I guess (not sure why you'd want to).

Local $String = "line1 " & _
                "line2 " & _
                "line3 "

MsgBox(0, "", $String)
Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
water

But that's not what the OP needs. He's looking for a way to have a NewLine character in his data.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Share this post


Link to post
Share on other sites
JohnQSmith

Then, how about

Local $sString = ( _
"line1" & @CRLF & _
"line2" & @CRLF _
)
Edited by JohnQSmith

Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×