Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy content of existing webpages to new template?

Status
Not open for further replies.

rudo

Programmer
Jul 3, 2002
72
0
0
NL
Hi,
I need to make changes to 170 existing web pages (courtfool.info). All pages have the same structure (that is: a table dividing each page in parts and many divisions <div> for different purposes). The existing content would have to be transferred to a template with a different structure.
Can this be done with vba and if so, would someone have a sample macro that opens html files, finds specific selections in the code (in <head> and <body> sections) and copies and pastes them into a (template) html file? That would be great to get started.
All suggestions are welcome!
Thank you very much in advance!
Rudo
 



What Application?

You may have better results in forum329.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi Skip,

My web editor is FrontPage. However, I want to use vba-Excel to apply the modifications to the html-code, as I can enumerate the different find and replace instructions more easily on an Excel sheet. (Also I have to compose a new specific html-section with vba-Excel.)

Meanwhile I found out I can copy the html files of my website to a temporary folder, change the extensions into .txt and open each file in Word. This opens the code-view page in Word. Subsequently I can include the find and replace instructions of word-vba in my excel-vba macros. (I added Word in the vba menu Tools, References.)

At this moment I am stuck with a line feed problem inside a find and replace instruction. I will try to solve that tomorrow.

Thanks for your reaction.

Kind greetings,

Rudo




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top