Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent and very important (convert to photoshop)

Status
Not open for further replies.

mp3nick

Programmer
Feb 10, 2003
14
0
0
MY
hi
after converting some queries from excel to photoshop text layer, I got two problems , first alt+enter chr(10) in the excel documents didn't affect means my my text in photoshop are in the same line and haven't gone to second line, and the second thing is that I want my text go the next second line if the spacing is only one line and if its two line wrap at the same size with both two lines with the same size.

sample :
this is the test for the wraping text lines
in the one single frame

to

this is the test for the wraping
text lines in the one single frame


Sub SendAllCells2ps()
Dim I As Integer
Dim B As String
Dim LocationFolder As String
I = 1
Range("C1").Select
Do Until Selection.Cells(I, 3).Value = ""
If I < 10 Then B = &quot;00&quot; & I
If I < 100 And I > 9 Then B = &quot;0&quot; & I
If I > 99 Then B = I
Selection.Cells(I, 3).Select
Photoshop.Application.ActiveDocument.Layers(&quot;Text&quot;).ArtLayer.TextItem.Contents = Selection.Value
I = I + 1
LocationFolder = &quot;C:\Test\&quot; & B & &quot;.psd&quot;
Photoshop.Application.ActiveDocument.SaveAs (LocationFolder)
Loop
End Sub
 
For the first part, you should be able to use something like this:
Code:
Dim sText As String

sText = Replace(Selection.Value, Chr(10), Chr(13) + Chr(10))
Photoshop.Application.ActiveDocument.Layers(&quot;Text&quot;).ArtLayer.TextItem.Contents = sText
I don't quite understand the second part, but you can force a second line by appending
Code:
Chr(13)+Chr(10)
to the string.
 
hi
about wraping I kinda give up cause I have to write a very professional script
but can you introduce me some reference for vba ? I want to know each command sample and things, for instance I need to know the command to know the each row size

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top