autotext loses formatting

D

Drake

I am having a problem with autotext that I paste into a document via VBA
dropping the underlining or hidden text.

My insert code is:

temps(testtemplate).AutoTextEntries("TestAutoText").Insert
where:=Selection.Range

It drops it in fine, but if there is text underlined or if there is hidden
text, it is dropped.

Any thoughts?
 
J

Jay Freedman

Hi Drake,

You're missing the optional second argument -- try

temps(testtemplate).AutoTextEntries("TestAutoText").Insert _
where:=Selection.Range, RichText:=True

The RichText argument defaults to False, which means "plain text".

(P.S.: This info *is* in the VBA help topic on the Insert method.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top