Consulting

Results 1 to 2 of 2

Thread: DocVariable - Help

  1. #1
    VBAX Newbie
    Joined
    Nov 2011
    Posts
    1
    Location

    DocVariable - Help

    word 2010

    In VBA I have set up the following variable:

    Dim vTest As String
    vTest = "testing"
    ActiveDocument.Variables.Add Name:="test1", Value:=vTest

    using the "Quick Parts" I have added a docVariable field called "test1" but nothing returns. when I hit alt+F9 the following is returned: {DOCVARIABLE test1 \*MERGEFORMAT}

    Can someone help with what I am doing wrong and why this isn't returning my "testing" string? Thank you for your time.
    Last edited by LIT; 11-19-2011 at 11:17 AM.

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,729
    Location
    F9 will update the DOCVARIABLE field

    Alt-F9 just toggles between the value and the { definition }

    Ctlt-Shift-F9 will unlink it

    And there's the ever popular F9 to insert the { ... } field markers


    Paul

Posting Permissions

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