Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word - replace in headers
Message
From
22/10/2009 11:10:49
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01429439
Message ID:
01430645
Views:
41
>>Unfortunately, I didn't manage to make it work. Adapting the sample code, I wrote the following:
>>
>>
>>This.oDoc.Sections(1).Headers(1).Range.Find.Execute(tcFindText, .F., .F., .F., .F., .F., .T., 1, .F., tcReplaceText, 2)
>>
>>
>>Where This.oDoc is a reference to the current document, and tcFindText contains a text that actually occurs in the header.
>>
>>After trying a few other combinations, I found that the above command doesn't give any error message... but it doesn't replace anything, either. Any ideas, what I might be doing wrong? Using Word 2003, by the way.
>>
>>TIA,
>>
>>Hilmar.
>
>I tried to find a way to fire a "Record macro" in Word 2007 and was unable to, so I gave up this problem for now. I'll try tomorrow.

I find Word 2007, and Excel 2007, just horrible - I never find anything.

I did try recording macros, but since the results looked quite different to the sample you pointed me to, I wanted to check, just in case I missed something.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform