Timing your DDE purchase can be interesting. First of all, you will need at least your AP voucher before you can place your order. Second, the DDE cards can take 8 weeks to arrive, so they will add an additional month or two to your expiration date to compensate. So if you order it in early June the expiration date would be no earlier than June 30, 2006, but more likely would be July 31, 2006. Either way, you would be covered for your second trip.
If you are traveling to WDW within a few weeks of ordering the DDE, they will snail mail you a confirmation letter that you can use in place of the DDE cards in the interim. This letter will have an expiration date that is just 6 weeks or so from your order date, so some people are finding that the letter has expired BEFORE their cards arrive! If it happens that your trip falls in between the expiration date of your letter and the arrival of your cards you can request another letter, but since there will not be time to snail mail it to you, you will have to pick it up at Epcot's Guest Services window. I don't know why they don't put a longer expiration on the letter to prevent this from happening...
Given you are traveling at the end of July you may have just enough time to order your AP, get your voucher and then order the DDE and still get your cards before your trip if you act quickly. You would need to get the AP voucher in time to order the DDE within the first few days of June to be reasonably sure that the DDE cards will arrive in time. However you'll probably be sweating it out that last week before you leave, wondering if the cards are going to make it in time and wondering whether you will have to call the DDE office to request that a last-minute confirmation letter be left for you to pick up at Epcot.
Another option for you, if you don't mind carrying a confirmation letter for your first trip, is to order the DDE three weeks before your trip. Tell them your trip date when you place your order so that they will snail mail you the confirmation letter. (Don't order too close to your departure date because if they don't have at least two weeks, they will not mail the letter and you will have to go to Epcot to pick it up.) With this scenario, you would be ordering the DDE in early July, so your expiration date will be at least July 31, 2006 but more likely August 31, 2006. The downside to this approach is that you have to carry a folded letter rather than a card, but you will receive the letter in the mail rather than having to pick it up at Epcot and you will be guaranteed to have something valid in your hand that can be used as soon as you arrive at WDW -- no need to make a mad dash over to Epcot to pick anything up.
By the way, you are entitled to two DDE cards (one for you, one for your spouse/partner), but they only send one copy of the confirmation letter. Since it is printed on watermarked paper, it's not clear whether a photocopy of the letter would be accepted. So if both you and your spouse/partner each need a copy, I would ask them to send you two copies of the confirmation letter so that you each have one for the trip.