+ Reply to Thread
Results 1 to 5 of 5

How to get Excel input box string into single Word eMailMerge doc

  1. #1
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    580

    How to get Excel input box string into single Word eMailMerge doc

    Hello!

    I am using Excel with Word for an eMailMerge.

    In one implementation which only goes to one specific person at a time, I need to allow the user to input a short string that he does not want to make into a field (ergo, input...).

    We experimented with Mr. de Bruin's methods, but he wanted to have more flexibility over changing his letter and wanted that which Word provides, so we went to the hybrid Excel-Word solution as we were already employing it for the subdivision "blast".

    The eMailMerge document itself is a standard docx letter with fields defined for the merge and called from code as others have guided me (at considerable length) to develop on this board.

    Can this be done relatively simply, or should I just say it needs to become a field in the table from which the other information is extracted?

    MUCH appreciate your wisdom!

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: How to get Excel input box string into single Word eMailMerge doc

    That's a tall ask when we don't know what code you're using or where this mysterious output is supposed to go...

    Getting the user input is as simple as using an InputBox. The trick is in doing something with it and, for that, clear rules are needed.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    580

    Re: How to get Excel input box string into single Word eMailMerge doc

    But cytop and you wrote most of it ...

    Parameters: vrtSelectedItem is the full path and filename of the user selected document from a calling procedure.
    strSubject is a user input of the subject line.

    The string I want to plant into the Word document could also be sent as a parameter to the following code from the calling procedure.


    Please Login or Register  to view this content.
    I have a faint memory of having done this before by using a bookmark in the Word document, but I do not know if the method is applicable, nor if it is the most direct route, but I did know that you folks would be able to advise me on the "Best Practices" course of action (I am avoiding saying "the best course of action" as I historically have seen that result in an esoteric debate of the term "best" relative to the universe and all within).

    Thank-you!

  4. #4
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: How to get Excel input box string into single Word eMailMerge doc

    Quote Originally Posted by brucemc777 View Post
    But cytop and you wrote most of it
    That's all very well, but the mere fact we've given you some code and you've implemented it in a way we hadn't seen means it would be unwise to assume anything...

    After:
    With wdDoc
    you could insert:
    .Bookmarks("MyBookmark").Range.InsertBefore InputBox("What is your supplementary text?")
    where 'MyBookmark' is the name of a bookmark in your mailmerge main document.

  5. #5
    Forum Contributor
    Join Date
    03-05-2007
    Location
    Falmouth, VA now, Palm Bay, FL for 2 yrs, was Colorado Springs, CO for ten years; Cedark Park, TX; Zeeland, MI; Wilmette, IL; Princeton Junction, NJ; NY, NY
    MS-Off Ver
    365
    Posts
    580

    Re: How to get Excel input box string into single Word eMailMerge doc

    Many Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Match single word to string of text
    By Seraph84 in forum Excel General
    Replies: 6
    Last Post: 02-24-2016, 03:37 AM
  2. Excel formula switch first and Second word but keeps 3rd and remaining word in single cell
    By iwanttoexcelinexcel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-29-2015, 04:22 PM
  3. Change the colour of single word in text string based on another cell value
    By joshnathan in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-03-2014, 09:41 AM
  4. [SOLVED] Excel - Get the Word to the Left or Right of Another Word (text string)
    By sweetrevelation in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-22-2013, 01:36 PM
  5. Replies: 6
    Last Post: 02-06-2013, 07:45 PM
  6. Using FindNext to Quantify Change in 2 Single-Word String Lists
    By Veter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2008, 12:07 PM
  7. WORD-DELIMITED string vba macro for excel/word
    By jackal2k6 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-23-2005, 12:35 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1