By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,483 Members | 1,464 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,483 IT Pros & Developers. It's quick & easy.

Search for plain text variables in word document

P: n/a
Hi All,

Is it possible to read through a word document, find a number of
strings (using wildcards) and prompt the user to enter values for them.
I have a document management database that builds word documents based
on a template and then searches and replaces values saved in a table.
This works fine. However, I would like to then search through the
document after this procedure and see if there are any variables that
have not been replaced. Al plain text variables are in the following
format: <VariableName> I use the following code to perform the replace
process:

Set rs = db.OpenRecordset("SELECT * FROM tbl_Doc WHERE zDocID = '" &
Me.cboTask & "' or zMakeAvailable = true;")
Do Until rs.EOF
wdRange.Find.Execute FindText:=rs("zFind"),
ReplaceWith:=rs("zReplace"), Replace:=wdReplaceAll
rs.MoveNext
Loop
rs.Close
db.Close
Set db = Nothing
Set rs = Nothing

Any thoughts on this would be appreciated. Anton

Jan 9 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.