Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2001
    Posts
    119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    RESOLVED Variable inside string quotes?

    Hi,

    I need to be able to include a string variable, strHeading, inside the following line of code:

    ActiveDocument.Styles("Heading 1")

    Thus replacing Heading 1 with my variable?

    I know this is straightforward, but I seem to be missing the point.

    Any help much appreciated [img]/forums/images/smilies/smile.gif[/img]

  2. #2
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    vancouver, BC, Br. Columbia
    Posts
    109
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RESOLVED Variable inside string quotes?

    How did you resolve this? I'm interested ...
    Gwenda

  3. #3
    5 Star Lounger
    Join Date
    Jul 2002
    Location
    Toronto, Ontario, Canada
    Posts
    1,139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: RESOLVED Variable inside string quotes?

    You would do it like:

    ActiveDocument.Styles(MyVariableWithoutQoutes)
    --
    Bryan Carbonnell - Toronto <img src=/S/flags/Ontario.gif border=0 alt=Ontario width=30 height=18> <img src=/S/flags/Canada.gif border=0 alt=Canada width=30 height=18>
    Unfortunately common sense isn't so common!!
    Visit my website for useful Word, Excel and Access code, templates and Add-Ins

Posting Permissions

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