Results 1 to 3 of 3

Thread: Word, Macros. Ask user for their name & then display in word?

  1. #1
    Squeeler Vini's Avatar
    Join Date
    Jul 2003
    Location
    Sheffield
    Posts
    1,769
    Thanks
    44
    Thanked
    8 times in 8 posts

    Word, Macros. Ask user for their name & then display in word?

    I want to create a basic form, which eventually will result in a dynamic document being created in Word.

    I want to ask the user for their name, address and telephone number (etc), and then have this information entered into a specific part of the document.

    Any ideas?

    I've been able to create a macro to prompt the user for the name, but not being able to do anything with the name they input. (using this guide; link)

  2. #2
    unapologetic apologist
    Join Date
    Nov 2005
    Location
    UK
    Posts
    1,954
    Thanks
    363
    Thanked
    275 times in 146 posts

    Re: Word, Macros. Ask user for their name & then display in word?

    you have to create bookmarks where the data will go, and the macro places it there when finished.

    as you know, in Excel the bookmarks aren't necessary, since there are coordinates for each cell, but Word's only way of locating something is via said bookmarks
    One can never stop saying Thank You

  3. #3
    Member
    Join Date
    Nov 2003
    Location
    Salisbury
    Posts
    170
    Thanks
    2
    Thanked
    6 times in 6 posts
    • hibby's system
      • Motherboard:
      • Supermicro C7Z87-OCE
      • CPU:
      • Intel Core i7-4770
      • Memory:
      • 2x8GB Corsair DDR3 Vengeance LP 1600MHz (9-9-9-24)
      • Storage:
      • 256GB Samsung 840 Pro; 120GB OCZ Vertex 3; 1TB Samsung SpinPoint F1 HD103UJ; 250GB Seagate 7200.10
      • Graphics card(s):
      • Sapphire HD 7970 Vapor-X GHz
      • PSU:
      • 620W Corsair HX620
      • Case:
      • Antec P182
      • Operating System:
      • Windows 7 Ultimate 64bit
      • Monitor(s):
      • 24" Dell U2413; 24" Dell 2408WFP; 17" Dell 1704FPT
      • Internet:
      • Slow, rural broadband

    Re: Word, Macros. Ask user for their name & then display in word?

    One slight issue is that the standard way to replace text at a bookmark also deletes the bookmark - not so useful if you want to be able to change the text later with the same macro. There is a workaround for this though.

    You may also want to look at document variables, which I prefer for this. Once you've got your variable, use Ctrl + F9 to put a field into your document and type "DOCVARIABLE" and the name of your variable between the curly braces, e.g. { DOCVARIABLE firstName }. Just be very careful you don't set the variable to nothing, as it then gets deleted and causes errors next time you try and retrieve the data.
    If you can't keep up, stick with reality...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Word 97 & XP
    By thisisthebarmy in forum Help! Quick Relief From Tech Headaches
    Replies: 0
    Last Post: 24-10-2006, 08:42 PM
  2. User with limited account cannot save files in Word 2000
    By Ruggerbugger in forum Help! Quick Relief From Tech Headaches
    Replies: 2
    Last Post: 16-02-2005, 01:51 AM
  3. Microsoft Word 2003 Macros
    By Cuffz in forum Software
    Replies: 2
    Last Post: 15-02-2005, 11:19 AM
  4. CAT 4.6's
    By Steve in forum Graphics Cards
    Replies: 18
    Last Post: 13-06-2004, 11:36 AM
  5. Windows Networking User Display App
    By rory1984 in forum Software
    Replies: 6
    Last Post: 29-02-2004, 11:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •