![]() |
#6
|
|||
|
|||
![]()
I do like the deep end...hahaha! Thank you Greg for your help with this!!
I have a few questions (big shocker, I know ![]() 1. The macro works for but it's only changing the first instance of "This student". When I first ran it it worked for every instance... I get a Run-time error 4198? When I debug the following line is highlighted: Set oCC = ActiveDocument.ContentControls.Add(wdContentContro lText, oRng) I have other document properties in the word doc, I'm not sure if that's problematic, I wouldn't think so but see previous post about "in over my head"? 2. Can I add more parameters? Like this: strFind() = Split("This student|student|STUDENT|this Student|This Student", "|") and then change the MatchCase to True? 3. I'm wondering if there is a Not statement I can tie in? In SQL you can basically say look for "student" but not "my student" and then when you find the correct one replace it with "Ann Smith". Is selective replacing possible w/ VBA? The word "student" appears in areas of general text and should not be changed to the proper name (that is now tied to the content control). Also, the word "students" appears randomly and I don't want that to change. I tried changing it from False to True for .MatchWholeWord but then it didn't recognize both terms...It's not specific areas or I would be asking for help with ranges haha. Thank you in advance (again) for your help. I'm trying to figure these things out before I post. So far I just have a headache ![]() Last edited by dmarie123; 12-12-2012 at 12:03 PM. |
Tags |
content control, vba in microsoft word, word 2007 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
iiiiifffff | Word VBA | 16 | 06-04-2016 01:47 AM |
How to Rename a Quick Part | sleake | Word | 14 | 10-14-2013 09:21 AM |
quick replace, sort, change columns | userman | Excel | 1 | 05-01-2012 06:24 AM |
Quick change for all text boxes in a presentation | tmlander | PowerPoint | 1 | 03-09-2012 01:20 AM |
Date display in Mod quick part header | Jrul John | Word | 1 | 08-02-2010 12:17 PM |