Discussion:
Strange Happenings
(too old to reply)
dwacon
2008-04-20 04:51:30 UTC
Permalink
Doing some writing in Word 2007 and hit the hotkey for a custom macro I
wrote last year:

Sub Beat()
Selection.TypeText Text:=Chr(11) & vbTab & "(beat)" & Chr(11)
End Sub

Well, suddenly I get a debug error, Chr(11) is the culprit.

It worked fine the day before. What changed?

I looked at properties for my macro project and nothing seemed to have
changed.

Did a surreptitious windows update kill my simple macro?

Any M$ experts have ideas?

TIA...
--
Unser Kollege Kredit Ist Gestorben.
http://dwacon.blogspot.com
Farelf
2008-04-20 09:48:48 UTC
Permalink
Post by dwacon
Doing some writing in Word 2007 and hit the hotkey for a custom macro I
Sub Beat()
Selection.TypeText Text:=Chr(11) & vbTab & "(beat)" & Chr(11)
End Sub
Well, suddenly I get a debug error, Chr(11) is the culprit.
It worked fine the day before. What changed?
I looked at properties for my macro project and nothing seemed to have
changed.
Did a surreptitious windows update kill my simple macro?
Any M$ experts have ideas?
No expert and don't have Word 2007 but your macro works fine in 2003.
So does

Selection.TypeText Text:=vbVerticalTab & vbTab & "(beat)" & vbVerticalTab

... which might be a workaround.

Loading...