![]() |
#1
|
|||
|
|||
![]() I am trying to build a macro that extracts both the display text and the screen tip text from an AUTOTEXTLIST field and writes it to a separate Word document table. Since I have been unable to locate approaches that can do this, I thought the way to go was to loop through all AUTOTEXTLIST fields, capture each field’s display text, write it to a table cell, then loop again through the same fields, but with the codes switched on to reveal the screen tip text (which is in quotes). Unfortunately, I am using the selection method, partly because I don’t know how else to get text enclosed by quotes from a string (evidently there is no “collection” for it, unlike hyperlink links). I got this to work reasonably well in step mode, but in real time, it extracts the display text but only the first screen tip text. At various times in the code to get the string tip text,, the code-driven selection extends well beyond the desired text to include several paragraphs. I thought that by separating the two extracts (display vs screen tip) would alleviate this, but it made no difference. I’ve attached this latest version which does two loop sequences through a document, one to get the display and the other to get the screen tip. Can someone suggest a fix or an alternative method? The macro and its test document are attached. |
Tags |
autotextlist, extract, field |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
Macro to find coloured text and replace with form-field/formtext containing that text | tarktran | Word VBA | 1 | 11-26-2014 08:12 AM |
![]() |
mhblake | Word VBA | 5 | 01-08-2014 08:22 AM |
Autotextlist Gone | Wilson | Word | 1 | 04-04-2010 02:44 PM |
![]() |
zssteen | Excel | 1 | 06-19-2009 02:32 AM |