Coding works in Windows System but not in Mac

R

Rakesh

Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Hi All,

I have a code to insert sometext to before the para.

The Code works in Microsoft Word 2003 for Windows, But it not works in Microsoft Word 2004 for Mac "Version 11.3.5"

It shows the error message as:

Run Time Error '5990'
The find what text contains a range that is not valid.

Can any Technicians help me.

Below is the code for you ref:

Sub Minor_Subtotal_Minor()
'
'
ActiveDocument.Content.Find.Execute _
FindText:="([!^13]@%^13)([0-9,]@^13)([!^13]@%^13)", _
MatchWildcards:=True, _
ReplaceWith:="Tip1:\1Tip2:\2Tip3:\3", _
Replace:=wdReplaceAll

End Sub

Thanks,
Rakesh
 
J

John_McGhie_[MVP]

Try replacing the ^13 with ^10

Remember you're on a Mac: you do not have "carriage return, line feed" at
the end of a line.

Sorry: I don't have time to test this...


Version: 2004 Operating System: Mac OS X 10.4 (Tiger) Hi All,

I have a code to insert sometext to before the para.

The Code works in Microsoft Word 2003 for Windows, But it not works in
Microsoft Word 2004 for Mac "Version 11.3.5"

It shows the error message as:

Run Time Error '5990'
The find what text contains a range that is not valid.

Can any Technicians help me.

Below is the code for you ref:

Sub Minor_Subtotal_Minor()
'
'
ActiveDocument.Content.Find.Execute _
FindText:="([!^13]@%^13)([0-9,]@^13)([!^13]@%^13)", _
MatchWildcards:=True, _
ReplaceWith:="Tip1:\1Tip2:\2Tip3:\3", _
Replace:=wdReplaceAll

End Sub

Thanks,
Rakesh

--

The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!

John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410 | mailto:[email protected]
 

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