Macrofield

P

Peter Lingo

Hello
when I put a macrofield with text content in a document there is always a
space at the end of this field and if you make a font.StrikeThrough the line
is one character (the space) longer than the word. How can I avoid this?

Thanks Peter
 
W

Word Heretic

G'day "Peter Lingo" <[email protected]>,

Alt+F9 (reveal field codes)
Edit the macrobutton field to remove the trailing space
Alt+F9 (Hide field codes)

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Peter Lingo reckoned:
 
P

Peter Lingo

But how can I make this by vba? Manual by keyboard it is possible.

Thanks
Peter
 
C

Chad DeMeyer

hi peter

Set oFld = 'the field you just inserted
oFld.Select
Selection.MoveRight Unit:=wdCharacter, Count:=1
ActiveWindow.View.ShowFieldCodes = True
Selection.MoveLeft Unit:=wdCharacter, Count:=1
Selection.TypeBackspace
ActiveWindow.View.ShowFieldCodes = False
oFld.Update

Regards,
Chad
 

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