IAddressFormattedAddress Property |
Returns the given address in a single string, formatted according to the national rules. Useful when generating address labels.
Does not substitute the default contact address if the address is blank. If the address is empty, then the FormattedAddress is also empty. Use SOContact.FormattedAddress or SOPerson.FormattedAddress instead. The formatting is specified in the Addressformat table
Namespace: SuperOffice.COM.SuperOfficeDB
Show address of ownercompany
This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.
set objso = CreateObject("superofficedb.database") if objso.login("<USERNAME>", "<PASSWORD>") then set contact = objso.GetContact(objso.OwnerContactId) msg = msg & "************* Street address *************" & vbCrLf msg = msg & "Address1: " & contact.StreetAddress.Address1 & vbcrlf msg = msg & "Address2: " & contact.StreetAddress.Address2 & vbcrlf msg = msg & "Address3: " & contact.StreetAddress.Address3 & vbcrlf msg = msg & "AddressId: " & contact.StreetAddress.AddressId & vbcrlf msg = msg & "City: " & contact.StreetAddress.City & vbcrlf msg = msg & "CountryId: " & contact.StreetAddress.CountryId & vbcrlf msg = msg & "County: " & contact.StreetAddress.County & vbcrlf msg = msg & "FormattedAddress: " & contact.StreetAddress.FormattedAddress & vbcrlf msg = msg & "State: " & contact.StreetAddress.State & vbcrlf msg = msg & "Type: " & contact.StreetAddress.Type & vbcrlf msg = msg & "TypeIdx: " & contact.StreetAddress.TypeIdx & vbcrlf msg = msg & "ValidFrom: " & contact.StreetAddress.ValidFrom & vbcrlf 'bug id 6147 'msg = msg & "ValidTo: " & contact.StreetAddress.ValidTo() & vbcrlf msg = msg & "ZipCode: " & contact.StreetAddress.ZipCode & vbcrlf msg = msg & "************* Postal address *************" & vbCrLf msg = msg & "Address1: " & contact.PostalAddress.Address1 & vbcrlf msg = msg & "Address2: " & contact.PostalAddress.Address2 & vbcrlf msg = msg & "Address3: " & contact.PostalAddress.Address3 & vbcrlf msg = msg & "AddressId: " & contact.PostalAddress.AddressId & vbcrlf msg = msg & "City: " & contact.PostalAddress.City & vbcrlf msg = msg & "CountryId: " & contact.PostalAddress.CountryId & vbcrlf msg = msg & "County: " & contact.PostalAddress.County & vbcrlf msg = msg & "FormattedAddress: " & contact.PostalAddress.FormattedAddress & vbcrlf msg = msg & "State: " & contact.PostalAddress.State & vbcrlf msg = msg & "Type: " & contact.PostalAddress.Type & vbcrlf msg = msg & "TypeIdx: " & contact.PostalAddress.TypeIdx & vbcrlf msg = msg & "ValidFrom: " & contact.PostalAddress.ValidFrom & vbcrlf 'bug id 6147 'msg = msg & "ValidTo: " & contact.PostalAddress.ValidTo & vbcrlf msg = msg & "ZipCode: " & contact.PostalAddress.ZipCode & vbcrlf msgbox msg, ,"SuperCOM" else MsgBox "Unable to connect to database" end if Set objSO = Nothing