+ Reply to Thread
Results 1 to 9 of 9

Display user selected Text from a Combobox in the footer of Word Document

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Display user selected Text from a Combobox in the footer of Word Document

    I have created a simple Combobox in the body of a Word document. I want whatever is selected by the user from the Combobox to appear in the footer of my document.

    It should be noted that the Combobox appears in a different 'Section' to the footer in question. How do I link the two to allow this to happen?

    Many thanks

  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: Display user selected Text from a Combobox in the footer of Word Document

    Simply apply a unique Style name to the range spanned by your combobox and insert a STYLEREF field pointing to that Style in the footer.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Display user selected Text from a Combobox in the footer of Word Document

    Hi macropod,

    Thanks for your reply, how do I 'apply a unique Style name to the range spanned by your combobox'?

  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: Display user selected Text from a Combobox in the footer of Word Document

    First, if a suitable Style doesn't already exist, define the Style, via 'New Style button on the dropdown list that appears when you click on the little arrow in the rhs bottom corner of the Styles panel. Then simply select the range and apply the Style via the same dropdown list.

  5. #5
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Display user selected Text from a Combobox in the footer of Word Document

    I understand the Styles part, but don't understand 'Then simply select the range and apply the Style via the same dropdown list.'. How does this display the text from the Combobox in my header exactly? I've attached a really basic sample, are you able to demonstrate with this?

    Many thanks
    Attached Files Attached Files

  6. #6
    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: Display user selected Text from a Combobox in the footer of Word Document

    It would work if your STYLEREF field referred to the Style name instead of the content control's placeholder text...

  7. #7
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Display user selected Text from a Combobox in the footer of Word Document

    The Style Name I've used doesn't appear in the content control's placeholder. I'm clearly being think here and missing something!

  8. #8
    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: Display user selected Text from a Combobox in the footer of Word Document

    It has nothing to do with anything in the content control's placeholder. You've formatted the content control with the 'no spacing' Style, so that Style's what your STYLEREF field should reference.

  9. #9
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Display user selected Text from a Combobox in the footer of Word Document

    Okay, got it finally, me being thick...

    Many thanks for your help

+ 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] How to add header/footer to new word document through excel
    By RonNCmale in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-30-2013, 03:07 AM
  2. Add text to Existing Word Document if it Doesn't exist create Word Document
    By unstable81 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-10-2013, 12:15 AM
  3. vba code to search text in a word document header and footer
    By Excel-o-ratoR in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2012, 03:16 AM
  4. vba code to seacr text in header and footer of a word document.
    By nitin.srivastava in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-12-2012, 12:07 AM
  5. Controlling the Footer of Word Document from Excel
    By Steve C. in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2005, 01:06 AM

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