In Word, can I copy a number to the clipboard then do maths on it?

J

John

Hi.

I am very new to this.

I'd be really grateful if someone could help/guide me. I want to
create a macro in Microsoft Word but I don't know visual basic.

I want to be able to highlight a number then:

- copy it to the clipboard
- subtract 298
- paste the value to the Word document, overwriting the original text

Thanks
 
Y

Yves Dhondt

There is no need to go through to clipboard, your macro can do it.

Sub ScratchMacro()
Selection.Range.text = Selection.Range.text - 298
End Sub

Yves
 
Top