-
It now runs regardless if Yritys has anything, but it wont print the Yritys.
So if there is nothing on it, or if there is, the label is the same.
Edit: I moved the Yritys to rigth place:
[VBA]If InStr(1, thebody, "Yritys:") <> 0 Then
MyYritys = Mid(thebody, InStr(1, thebody, "Yritys: ") + 8, _
InStr(InStr(1, thebody, "Yritys: "), thebody, vbCrLf) - _
InStr(1, thebody, "Yritys: ") - 8)
'Added Yritys in between street and city
TheResult = MyName & vbCrLf & MyYritys & vbCrLf & MyAdress & vbCrLf & UCase(MyPlace)
Else
'Address without Yritys
TheResult = MyName & vbCrLf & MyAdress & vbCrLf & UCase(MyPlace)
End If[/VBA]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules