-
if <Amend> is found then before next <Amend> should find </Amend> else give me an error and select <Amend> that does not have matching pair
Would be cool if I could tell the computer just that and he would understand
Anyway I will try and let you guys know how far did i manage to come
-
is it possible to find one start tag and then another one and then check if between those two there is an end tag?? Or this can not be done this way
-
how is this done: find <Amend> and then another <Amend> and select all the text beetwen these two codes including codes and then search in this selection if </Amend> exists and if exists move and find another instance like this and so on till end of the document ?????? Any suggestions
-
OK...all right, all right. Geeeez. I have no real use for this, but because it seems to be a big issue, I will write a SMALL portion of this to give you an idea of how it could be done.
I can not do this immediately, but I will do it shortly. As stated, it is not really difficult, just boring and tedious.
Give me a day or so. I will use your sample doc to demonstrate.
-
Oh, and md has the correct idea. It would be MUCH MUCH better to have correct input in the first place. Put in proper opening and closing tags.
Which brings up a point....how are the tags being inserted in the first place????
-
Here is a simple way to add your tags.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
-
I know it would be better to have correct input but that is the problem I do not make this documents I just get them from other translation divisions and distribute them to our translators.
-
Yeah....well, I have started on this. Yikes! So far I have a UserForm that lists ALL tags (in order) so it is fairly easy to see errors; as well as a list of tags by type. Now comes the tricky part of actually doing the logic. As stated....tedious and boring.
To make the demo easier (on me) I am NOT going to make it recursive and check tags within tags. In other words, I am NOT going to check nestings - which if you want a full parsing I would suggest this actually get done. (Good luck with that....) But I ain't gonna do it.
This is pretty complex and I am not sure how long this will take, as I have other more.....hmmmmm....crucial tasks that need to get done.
Patience.
-
np
Just check the Amend tags i dont need to know if tags inside are correct
thnx again
-
any luck Gerry?
thnx for all your help
saban
-
just one question
when I loop throgh text looking for </Amend> when it is found i 'do something
then i search further. But how can I find one more time this same </Amend>
(Not to find another instance of </Amend> but the same as previous and after i have found it 2 times i move to the next instance
Thnx
-
-
did you manage yet to write code for <Amend> checking
Thnx
-
Hi Saban,
I'm playing around with some code. Do you have a larger sample to test.
Regards
MD
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
Try the attached. Run Tags in the Word document. To help track down the error, paste the result from the output document into Cell A1 in Excel and run the Layout code.
Last edited by mdmackillop; 01-31-2006 at 02:45 PM.
Reason: Attachment updated. Excel file added.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
-
sample
thanks for all your help
Here is the large sample
-
i get subscript out of range in :
[VBA]Selection.TypeText MyData(i, 1) & vbCr[/VBA]
-
-
If you run my original code and paste the result into the spreadsheet of my last attachment, a quick inspection shows that \Amjust is missing. My later code identifies another error, an extra bracket two lines before the last table on Page 5. I'm looking into ways of highlighting the errors, to save the manual inspection.
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules