goraiders
11-13-2012, 09:33 AM
Hi All,
I'd very much appreciate some assistance with this problem I am having. I am aware of a solution for this in Excel VBA, but it doesn't seem to work in Word VBA. Here is my question
1) Is it possible to superscript part of a word or in my case a field (see code below)?
I've tried to use the following code but I am very much a VBA beginner and don't really know how to go about it
ActiveDocument.Variables("VolumeFlow").Value = "ft3/hour
"
ActiveDocument.Variables("VolumeFlow")=Selection.Characters(Start:=3, Length:=1).Font.Superscript = True
It gives me a "Compile Error. Named Argument Not Found" and highlights the "Start:=" segment. I'm confident this works in Excel for a cell, but obviously not here.
I know the variable "VolumeFlow" works as it provides me with the "ft3/hour" value
Any help would be appreciated.
I'd very much appreciate some assistance with this problem I am having. I am aware of a solution for this in Excel VBA, but it doesn't seem to work in Word VBA. Here is my question
1) Is it possible to superscript part of a word or in my case a field (see code below)?
I've tried to use the following code but I am very much a VBA beginner and don't really know how to go about it
ActiveDocument.Variables("VolumeFlow").Value = "ft3/hour
"
ActiveDocument.Variables("VolumeFlow")=Selection.Characters(Start:=3, Length:=1).Font.Superscript = True
It gives me a "Compile Error. Named Argument Not Found" and highlights the "Start:=" segment. I'm confident this works in Excel for a cell, but obviously not here.
I know the variable "VolumeFlow" works as it provides me with the "ft3/hour" value
Any help would be appreciated.