Q: Application.GetAddress

M

Mo

Hi out there,

I need some help on this one:

Does Application.GetAddress only return 255 characters?

This is the code - try it:

Application.GetAddress("", "<PR_COMPANY_NAME>" & vbCr & "<PR_GIVEN_NAME>
<PR_SURNAME>" & vbCr & "<PR_STREET_ADDRESS>" & vbCr & "<PR_POSTAL_CODE>" & "
" & "<PR_LOCALITY>" & "##" & "Tel " & "<PR_OFFICE_TELEPHONE_NUMBER>" & vbCr
& "Fax " & "<PR_BUSINESS_FAX_NUMBER>" & vbCr & "Mobil " &
"<PR_CELLULAR_TELEPHONE_NUMBER>" & vbCr & "<PR_EMAIL_ADDRESS>" & "#¤",
False, 1, 1)

The last parameter(=1) tells to show the "To:"-box. I guess, because U want
to add more than 1 contact :). The downside is - I can only get 255
characters in return :-(.

OR is there another way? The description of the function says nothing of the
data type it returns.

Thanks,
Peeter
 
W

Word Heretic

G'day "Mo" <[email protected]>,

Kerrect. You can try something like

Part1 = left$(expression,255)
Part2 = mid$(expression,256,255)

and so on

Steve Hudson - Word Heretic Sydney Australia
Word eTutor

wordheretic.com


Mo reckoned:
 
M

Mo

Thanks for your reply,

if I understand you correctly, I put the return value into expression like

expression = Application.GetAddress("", "<PR_COMPANY_NAME>" & vbCr &
"<PR_GIVEN_NAME> <PR_SURNAME>" & vbCr & "<PR_STREET_ADDRESS>" & vbCr &
"<PR_POSTAL_CODE>" & " " & "<PR_LOCALITY>" & "##" & "Tel " &
"<PR_OFFICE_TELEPHONE_NUMBER>" & vbCr & "Fax " & "<PR_BUSINESS_FAX_NUMBER>"
& vbCr & "Mobil " & "<PR_CELLULAR_TELEPHONE_NUMBER>" & vbCr &
"<PR_EMAIL_ADDRESS>" & "#¤", False, 1, 1)

then i parse the expression like

Part1 = Left$(expression, 255)
Part2 = Mid$(expression, 256, 255)
Part3 = Mid$(expression, 512, 255)
Part4 = Mid$(expression, 768, 255)

If this was what you ment, the value of expression still only gets 255
characters in return from the function GetAddress.

Maybe I´m getting it wrong.

Thanks,
Peeter
 
W

Word Heretic

G'day "Mo" <[email protected]>,

no - you need the whole expression in each Left$() Mid$() component.

You can GENERATE a long string, you can't STORE it. So we keep
generating the long string and storing only what we can. Tis the
difference between VBA strings and C strings. VBA is RLE, C is RTE.

Steve Hudson - Word Heretic Sydney Australia
Word eTutor

steve from wordheretic.com (Email replies require payment)


Mo reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top