Well, after a little tinkering, I've gotten the macro to do
what I want; it just doesn't do it
how I want. The issue seems to be with our e-mail program rather than the macro.
What seems to be at the root is this string:
Code:
linessss="-------------------------------------------------------------------------------------------------------------"
string1 = linessss+"%0dDate:%20"+flt_dateb+"%09Flight:%20"+al_code+flt_num+airline+"%0dDeparts:%20%20"+orig+"%20at%20"+dept_timeb+"%20"+dept_am_pm+"%0dArrives:%20%20"+desta+"%20at%20"+arr_timeb+"%20"+arr_time_am_pm+"%0dSeat(s):%20"+seatsb+"%0d"+linessss
All of the variables are stored in this string. What I want it to do is write this string multiple times in a single e-mail, so that if this was your itinerary:
ABC123 -ETKT- *FQ
1. 1DOE/JANE
1 US2703S 06OCT SA TUSPHX HK1 310P 400P
2 US 409S 06OCT SA PHXSFO HK1 450P 649P 21C*
FONE-
1.WEB5551212*DAYOFDEPFON/EH925
2.WEB*USAIRWAYS.COM BOOKING/N000
3.WEB*EMAIL-SOMEONE*SOMEWHERE.COM/N000
This would be the hypothetical e-mail you'd get:
Hello,
This is to confirm that you have voluntarily changed, at our request, from flight 415 on October 6 to flight 409 on October 6. As compensation, each passenger will be issued one (1) Electronic Transportaion Voucher, which is valid for $200 off your next US Airways ticket purchase. We will send an email confirmation for your voucher(s) within four to six weeks after your travel has been completed.
Thank you for your coooperation and assistance
US Airways - Inventory Services
Your new itinerary:
Confirmation code: ABC123
--------------------------------------------------------------------
Date: 06 OCT Flight: US2703 - Operated by Mesa Airlines dba US Airways Express
Departs: Tucson, AZ at 3:10pm
Arrives: Phoenix, AZ at 4:00pm
Seat(s):
---------------------------------------------------------------------
---------------------------------------------------------------------
Date: 06 OCT Flight: US 409
Departs: Phoenix, AZ at 4:50pm
Arrives: San Francisco, CA at 6:49pm
Seat(s): 21C
---------------------------------------------------------------------
What I get instead is two seperate emails - one for each segment - with the string written once. Since I know I can get it to work the way I want when I write to a .txt file, I'm thinking the best way is to let the macro write to the .txt file, and then copy and paste into the email. Is this possible in CASL?