McGinley57
Technical User
I've been mulling this over for a day or two, and I'm just not experienced enough to get to an answer.
I have a Word file with a series of tables in it that present product prices. Column 1 is the product name, column 2 is product code and column 3 is price. In addition, I have an Excel file that is used to store all the prices in various currencies we sell in.
I've written VBA code in the Word doc to access the Excel file and retrieve prices in for a specific currency. The data item used for linking is the product code, which is specified in both files.
Now, here's what I want to do. For each product code in the Excel file, I want to search for a match in the Word file. When the search is successful, I want to move one cell to the right from the product code then replace the contents of the cell with the associated foreign currency price. I've written everything I need to establish communication between the two file and retrieve the prices. I can't perfect, however, a search and replace routine. If I use the Execute.Find method, I can find a product string and insert text into next cell, but I can't outright replace all the text in the cell. Something of an example of what I want to do can be found here: Instead of inserting the word "Tip", I want to move to the next cell and replace the contents (sorry for the redundancy).
If anyone can point me in the right direction, I'd appreciate it.
I have a Word file with a series of tables in it that present product prices. Column 1 is the product name, column 2 is product code and column 3 is price. In addition, I have an Excel file that is used to store all the prices in various currencies we sell in.
I've written VBA code in the Word doc to access the Excel file and retrieve prices in for a specific currency. The data item used for linking is the product code, which is specified in both files.
Now, here's what I want to do. For each product code in the Excel file, I want to search for a match in the Word file. When the search is successful, I want to move one cell to the right from the product code then replace the contents of the cell with the associated foreign currency price. I've written everything I need to establish communication between the two file and retrieve the prices. I can't perfect, however, a search and replace routine. If I use the Execute.Find method, I can find a product string and insert text into next cell, but I can't outright replace all the text in the cell. Something of an example of what I want to do can be found here: Instead of inserting the word "Tip", I want to move to the next cell and replace the contents (sorry for the redundancy).
If anyone can point me in the right direction, I'd appreciate it.