Hi, im looking for a macro whih transfers a text between ++ symbols to comments. Is there any possibility to achieve this. my text goes something like this
bla bla bla ++explicate this++ bla bla bla
any help?
Yours tom
Transform text between ++ to comments
- martin
- Official Nisus Person
- Posts: 5227
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Transform text between ++ to comments
Hi Tom- a macro like that is not too tough. Here's one:
That will preserve any formatting applied to the comment text. If you want to strip formatting from the comments, you can change the "Insert Attributed Text" command to just "Insert Text".
Code: Select all
Select Document Start
While Find Next '\+\+\s*(.+?)\s*\+\+\s*', 'E$'
Delete
Add Comment
Insert Attributed Text $1
Go to Marked Text
End
Re: Transform text between ++ to comments
Thanks a lot. I have found almost everything I need for the german version, which comes that way.
Select Document Start
While Find Next '\+\+\s*(.+?)\s*\+\+\s*', 'E$'
Löschen
Kommentar erstellen
Insert Attributed Text $1
Gehe zum markierten Text
End
I don't know if the question ever arised, but it would be very helpful if the macros wouldn't be language dependent (maybe in a future version?)
Yours,
Thomas
Did I say "Thank you!" - i didn't: shame on me Thank you, the macro does a perfect job.
Select Document Start
While Find Next '\+\+\s*(.+?)\s*\+\+\s*', 'E$'
Löschen
Kommentar erstellen
Insert Attributed Text $1
Gehe zum markierten Text
End
I don't know if the question ever arised, but it would be very helpful if the macros wouldn't be language dependent (maybe in a future version?)
Yours,
Thomas
Did I say "Thank you!" - i didn't: shame on me Thank you, the macro does a perfect job.
- martin
- Official Nisus Person
- Posts: 5227
- Joined: 2002-07-11 17:14:10
- Location: San Diego, CA
- Contact:
Re: Transform text between ++ to comments
I'm glad you got it working (and translated) Thomas.
Yes, it would be much better if one didn't have to translate the menu names in a macro. It's an annoyance we wish didn't exist, but the situation is a little complicated, so I'm not sure you'll see any progress soon.
Yes, it would be much better if one didn't have to translate the menu names in a macro. It's an annoyance we wish didn't exist, but the situation is a little complicated, so I'm not sure you'll see any progress soon.