Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLE Code
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00029260
Message ID:
00032018
Vues:
87
>>>>Craig
>>>Microsoft Office97 Visual Basic Programmer's Guide
>>>Microsoft Professional Editions - covers Microsoft Office 97 for Windows 95, Windows NT, and the Apple Macintosh
>>>Microsoft Press 1997
>>
>>Thanks. I picked up a copy yesterday, and it has a lot of what I need. Creating macros is a big help for finding function and object names, but I've run into a specific problem that I can't seem to find the answer to. Specifically, I want to send name and address information to Word's print envelope function (I utilize the Delivery Point Barcode feature). If I record a macro and type sample text in the Name and Address fields, the macro reveals that that data is stored in an autotext session with a random name, and is called everytime the macro is run. The macro doesn't give a path or filename to the location of this data, and I am not sure how to create or modify the data. Any ideas? Am I going about this the wrong way? Is there a better way to print an envelope? I have written a function that calculates Delivery point barcode for other purposes, so sendingthat data elsewhere would not be a problem. TIA
>Sorry I didn't reply sooner. I haven't done much with the contents of this book yet. When I do, I'll mainly be trying to get reports into Word. It won't be names and addresses.
>
>If you found a solution, I'd be interested to hear about it.

Found a solution. It came through recording the macro in Word 6.0. The earlier version stores the address directly in the command, where I believe Word '97 was getting automatically storing the address in the address book for future reference. Hence my problem. Turns out Word '97 will still take the command from Word 6.0, and it works seamlessly. Here's how it worked.
1. Built a text string from the database and divided the lines with chr(13)s
2. Put a checkbox on the screen to givethe Delivery point barcode option
3. Issued this to word: wrd:
wrd.ToolsCreateEnvelope(,,,,,,, envaddress,,,barcode.value ,,,, 1)

note: all of the commas are unused parameters. This was another source of pain, as the first 6 are undocumented (ANYWHERE. Not even the techs at MS knew they were there)

Anyway, works fine now.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform