WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Find and Replace VB Macros

 
   Home -> Office other -> Programming RSS
Next:  Layers  
Author Message
kj

External


Since: Jul 01, 2008
Posts: 2



(Msg. 1) Posted: Tue Jul 01, 2008 2:32 pm
Post subject: Find and Replace VB Macros
Archived from groups: microsoft>public>frontpage>programming (more info?)

I have 1000+ Word documents that I need to make into Web pages. I am saving
the .doc as .htm but then I have to go into the .htm and make several
repetitive changes to meet my sites requirements and eliminate code generated
by Frontpage. I want to built a macro in Frontpage's VB to find HTML tags
and/or attributes and replace them. So far what I have been able to find
online has "issues". For example I want to remove class=MsoNormal within the
<p> tag (in a table) and find class=MsoTableWeb1 in the table tag and replace
it with class=panel.

On my wishlist items, if there is a way to do this task to all 1000 .htm
documents at one time, I would really be estatic.

Any ideas are greatly appreciated.
Back to top
Login to vote
Steve Easton

External


Since: Oct 15, 2003
Posts: 8667



(Msg. 2) Posted: Tue Jul 01, 2008 6:01 pm
Post subject: Re: Find and Replace VB Macros [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

What version of FrontPage are you using?
If 2003 this is built in and is called global search and replace.

Edit > Replace and check "All pages" and "Find in source code."


--

Steve Easton
Microsoft MVP FrontPage
FP Cleaner
http://www.95isalive.com/fixes/fpclean.htm
Hit Me FP
http://www.95isalive.com/fixes/HitMeFP.htm




"kj" <kj DeleteThis @discussions.microsoft.com> wrote in message
news:DC0672E2-3A71-472F-9476-6CA51FFA753E@microsoft.com...
>I have 1000+ Word documents that I need to make into Web pages. I am saving
> the .doc as .htm but then I have to go into the .htm and make several
> repetitive changes to meet my sites requirements and eliminate code generated
> by Frontpage. I want to built a macro in Frontpage's VB to find HTML tags
> and/or attributes and replace them. So far what I have been able to find
> online has "issues". For example I want to remove class=MsoNormal within the
> <p> tag (in a table) and find class=MsoTableWeb1 in the table tag and replace
> it with class=panel.
>
> On my wishlist items, if there is a way to do this task to all 1000 .htm
> documents at one time, I would really be estatic.
>
> Any ideas are greatly appreciated.
Back to top
Login to vote
kj

External


Since: Jul 01, 2008
Posts: 2



(Msg. 3) Posted: Tue Jul 01, 2008 6:01 pm
Post subject: Re: Find and Replace VB Macros [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm using 2003. Thank you, that is very helpful. That alone will save me a
lot of time. I have 4 search and replace to do for each file. Is there a
way to string them together?


I also need to find and replace links that vary in each of the files. In
the example below
src="Submit%20Response/image001.gif"

I want to find the data between src=" and /image that will be different
for each file and replace it wil /image.new so that the replaced now reads
src="/image.new/image001.gif"

Is there a way to search for varying data using the global search or do I
need VB for that?

Thanks in advance.


"Steve Easton" wrote:

> What version of FrontPage are you using?
> If 2003 this is built in and is called global search and replace.
>
> Edit > Replace and check "All pages" and "Find in source code."
>
>
> --
>
> Steve Easton
> Microsoft MVP FrontPage
> FP Cleaner
> http://www.95isalive.com/fixes/fpclean.htm
> Hit Me FP
> http://www.95isalive.com/fixes/HitMeFP.htm
>
>
>
>
> "kj" <kj.RemoveThis@discussions.microsoft.com> wrote in message
> news:DC0672E2-3A71-472F-9476-6CA51FFA753E@microsoft.com...
> >I have 1000+ Word documents that I need to make into Web pages. I am saving
> > the .doc as .htm but then I have to go into the .htm and make several
> > repetitive changes to meet my sites requirements and eliminate code generated
> > by Frontpage. I want to built a macro in Frontpage's VB to find HTML tags
> > and/or attributes and replace them. So far what I have been able to find
> > online has "issues". For example I want to remove class=MsoNormal within the
> > <p> tag (in a table) and find class=MsoTableWeb1 in the table tag and replace
> > it with class=panel.
> >
> > On my wishlist items, if there is a way to do this task to all 1000 .htm
> > documents at one time, I would really be estatic.
> >
> > Any ideas are greatly appreciated.
>
>
>
Back to top
Login to vote
Stefan B Rusynko

External


Since: Oct 11, 2003
Posts: 12582



(Msg. 4) Posted: Wed Jul 02, 2008 4:12 am
Post subject: Re: Find and Replace VB Macros [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

You would just Search for: Submit%20Response/
and rep;ace with: /image.new/

PS
Do Not use a . in folder names as in "image.new"
- use an under_score or da-sh if you really need a separator for some reason
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


"kj" <kj.TakeThisOut@discussions.microsoft.com> wrote in message news:36681902-F0FF-44B2-A3C7-B536858C823D@microsoft.com...
| I'm using 2003. Thank you, that is very helpful. That alone will save me a
| lot of time. I have 4 search and replace to do for each file. Is there a
| way to string them together?
|
|
| I also need to find and replace links that vary in each of the files. In
| the example below
| src="Submit%20Response/image001.gif"
|
| I want to find the data between src=" and /image that will be different
| for each file and replace it wil /image.new so that the replaced now reads
| src="/image.new/image001.gif"
|
| Is there a way to search for varying data using the global search or do I
| need VB for that?
|
| Thanks in advance.
|
|
| "Steve Easton" wrote:
|
| > What version of FrontPage are you using?
| > If 2003 this is built in and is called global search and replace.
| >
| > Edit > Replace and check "All pages" and "Find in source code."
| >
| >
| > --
| >
| > Steve Easton
| > Microsoft MVP FrontPage
| > FP Cleaner
| > http://www.95isalive.com/fixes/fpclean.htm
| > Hit Me FP
| > http://www.95isalive.com/fixes/HitMeFP.htm
| >
| >
| >
| >
| > "kj" <kj.TakeThisOut@discussions.microsoft.com> wrote in message
| > news:DC0672E2-3A71-472F-9476-6CA51FFA753E@microsoft.com...
| > >I have 1000+ Word documents that I need to make into Web pages. I am saving
| > > the .doc as .htm but then I have to go into the .htm and make several
| > > repetitive changes to meet my sites requirements and eliminate code generated
| > > by Frontpage. I want to built a macro in Frontpage's VB to find HTML tags
| > > and/or attributes and replace them. So far what I have been able to find
| > > online has "issues". For example I want to remove class=MsoNormal within the
| > > <p> tag (in a table) and find class=MsoTableWeb1 in the table tag and replace
| > > it with class=panel.
| > >
| > > On my wishlist items, if there is a way to do this task to all 1000 .htm
| > > documents at one time, I would really be estatic.
| > >
| > > Any ideas are greatly appreciated.
| >
| >
| >
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> Programming All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET