+ Reply to Thread
Results 1 to 3 of 3

Inserting subscripted text in word table using VBA

  1. #1
    Registered User
    Join Date
    08-07-2012
    Location
    Lund Sweden
    MS-Off Ver
    Excel/Word 2013
    Posts
    2

    Inserting subscripted text in word table using VBA

    Hello,
    I am new to VBA and I am trying to build an excel sheet to be used to generate a word-document by using a word template with existing bookmarks. It is the bookmarks I update and save the template as a new document when its done. However, I have problems when trying to get text in the tables which I'd like to be subscripted.

    here is an example of my code:

    Please Login or Register  to view this content.
    So what I would like is to get the "a":s, "b":s and "c":s etc (in Fa, Fb and Fc etc) to be subscripted.

    I have here inserted a bit of a code I found on the internet while searching for tips but I get the error message incompatible types. If anyone knows how to solve this I would really appreciate it!

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,138

    Re: Inserting subscripted text in word table using VBA

    Which range? Excel or Word? You have to be sure and specify. And I would continue to use the already established table object.
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    08-07-2012
    Location
    Lund Sweden
    MS-Off Ver
    Excel/Word 2013
    Posts
    2

    Re: Inserting subscripted text in word table using VBA

    Yes, Thank you!
    It is just as you say, dim'ing the range as Word.Range does the trick!
    (and since it works by using the already existing table object I will stick to that)
    I have learned a lesson and I am very Grateful!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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