Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2012, 10:31 AM
JEilerts JEilerts is offline Autotext strings are being stripped of their format when called from VBA Windows 7 64bit Autotext strings are being stripped of their format when called from VBA Office 2003
Novice
Autotext strings are being stripped of their format when called from VBA
 
Join Date: Apr 2012
Location: Ottawa, Ontario, Canada
Posts: 2
JEilerts is on a distinguished road
Question Autotext strings are being stripped of their format when called from VBA

Hi,


I'm been having an issue from time to time (not always which is strange) with inserting an Autotext string using VBA. I can insert them fine, but they are stripped of their format (ie bold and italic). When I manually insert them, they look perfect.

I insert the autotext string using:
ActiveDocument.AttachedTemplate.AutoTextEntries("S tring").Insert _
Where:=Selection.Range

Any thoughts?

Thanks,
J
Reply With Quote
  #2  
Old 04-20-2012, 07:54 PM
macropod's Avatar
macropod macropod is offline Autotext strings are being stripped of their format when called from VBA Windows 7 64bit Autotext strings are being stripped of their format when called from VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi J,

As per Word's VBA Help file, you need to specify the RichText parameter:
ActiveDocument.AttachedTemplate.AutoTextEntries("S tring").Insert _
Where:=Selection.Range, RichText:=True
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 04-21-2012, 07:49 AM
JEilerts JEilerts is offline Autotext strings are being stripped of their format when called from VBA Windows 7 64bit Autotext strings are being stripped of their format when called from VBA Office 2003
Novice
Autotext strings are being stripped of their format when called from VBA
 
Join Date: Apr 2012
Location: Ottawa, Ontario, Canada
Posts: 2
JEilerts is on a distinguished road
Default

Thanks Paul...will try...I figured that there must be a parameter to do this but couldn't seem to find it!
Reply With Quote
Reply

Tags
autotext, format

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel where is procedure being called from davids67 Excel Programming 1 11-18-2011 06:48 AM
Autotext strings are being stripped of their format when called from VBA What is this symbol called as? Franky Word 3 11-12-2011 08:16 AM
Autotext strings are being stripped of their format when called from VBA Removing Character Strings digitalhecht Word 2 10-17-2011 12:53 PM
Autotext strings are being stripped of their format when called from VBA update style of all strings available between two specific strings vikrantkale Word 1 03-28-2011 06:13 PM
What is this right-click sub-menu called? wornways Word 3 08-13-2010 09:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:48 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft