Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Here is what I need to do. I need to enter an address into a document based
on a users selection with a listbox. It drops the information into the document, which is fine, but then later in the document, I need to grab the person's name from that information, and insert it elsewhere into the document. How can I accomplish this task? Any suggestions? It would be like this, First Last then a comma. I need to grab the first and last, before the comma. Not all names of course are the same length. Thanks in advance for any, and all help! Brian |
#2
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
Hi ?B?VHJlZmlsb3YyMg==?=,
Here is what I need to do. I need to enter an address into a document based on a users selection with a listbox. It drops the information into the document, which is fine, but then later in the document, I need to grab the person's name from that information, and insert it elsewhere into the document. How can I accomplish this task? Any suggestions? It would be like this, First Last then a comma. I need to grab the first and last, before the comma. Not all names of course are the same length. This newsgroup is targeted at end-users. You'll have better luck getting a quick and knowledgeable reply in one of the word.vba newsgroups. Be sure to mention the version of Word when you post a question. There are a number of possible ways this can be done, but to follow up on the approach you're considering: look up the Instr function in the VBA help. You can use the value this returns when you test for the comma in combination with the Left or Mid functions to get just part of a string. If you're interested in other approaches, or need to follow-up, please use a word.vba newsgroup, and include information on how you're populating the list box with the information. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Autonew macro in Word to select specific record from Excel database | Mailmerge | |||
AutoNew Macro in protected form | Microsoft Word Help | |||
AutoText in AutoNew macro | Microsoft Word Help | |||
How to reference a repeated field entry in a previous record | Mailmerge | |||
Go To Page function obligates you to delete previous entry | Microsoft Word Help |