Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Trefilov22 Trefilov22 is offline
external usenet poster
 
Posts: 31
Default Grabbing information from a previous entry in autonew macro

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   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M. Cindy M. is offline
external usenet poster
 
Posts: 2,416
Default Grabbing information from a previous entry in autonew macro

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Autonew macro in Word to select specific record from Excel database Peter Mailmerge 4 June 14th 06 05:39 PM
AutoNew Macro in protected form Helen B Microsoft Word Help 1 December 8th 05 06:56 PM
AutoText in AutoNew macro Sue Microsoft Word Help 2 July 1st 05 09:01 PM
How to reference a repeated field entry in a previous record Frustrated Mailmerge 3 May 11th 05 08:58 PM
Go To Page function obligates you to delete previous entry Kamran Microsoft Word Help 3 February 3rd 05 06:17 PM


All times are GMT +1. The time now is 05:59 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"