Adding a field to an autotext entry

G

gstevens11

Hi All:

I'm clearly missing something simple about ranges, objects and the se
statement. I want to create an autoext entry containing a SEQ fiel
with...

someRange.Fields.Add Range:=someotherRange, Type:=wdFieldSequence
Text:="numlist"

I'm completely clueless as to using the range objects here. When I ru
it I'm told there is nio somRange object.. and there isn't, since I'
not at all clear how to create one.

Thanks for your help
Garr
 
W

Word Heretic

G'day gstevens11 <[email protected]>,

Dim SomeRange as Range

Set SomeRange = ActiveDocument.Content

'now the range has a parent storyrange to belong to - actdoc.content.

'Let's say we are inserting at end of doc

SomeRange.Collapse wdcollapseend

'Now the insert

SomeRange.Fields.Add SomeRange,Type:=wdFieldSequence,
Text:="numlist"


Steve Hudson
Word Heretic Sydney Australia
Tricky stuff with Word or words

Email: WordHeretic at tpg.com.au


gstevens11 was spinning this yarn:
 

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