Re: How do you modify and save txt or xml file using FP VBA or via
- From: "Marko" <Marko@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jul 2005 07:14:03 -0700
Thanks for your reply Stefan.
However this would not work, because I am not trying to save the file to
file system, but to an ActiveWeb.
You agree that following would not work:
Set oText = oFSO.OpenTextFile("http://SomeSite/new_page_1.txt", ForWriting)
If I save the text file to File System, then I have to ask user to import
this file into the web. I think that there has to be a better way of doing
this.
I can use
Set oWebFile = ActiveWeb.LocateFile("http://SomeSite/new_page_1.htm")
oWebFile.open
to access ActiveDocument object of an HTM file "new_page_1.htm".
My question is, how do I do this for "http://SomeSite/new_page_1.txt"?
Code:
Set oWebFile = ActiveWeb.LocateFile("http://SomeSite/new_page_1.txt")
oWebFile.open
still works, but ActiveDocument returns nothing for TXT files.
How do I modify and Save this "new_page_1.txt" via VBA?
"Stefan B Rusynko" wrote:
> See VBA help on FileSystemObject
>
> --
>
> _____________________________________________
> SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
> "Warning - Using the F1 Key will not break anything!" (-;
> To find the best Newsgroup for FrontPage support see:
> http://www.net-sites.com/sitebuilder/newsgroups.asp
> _____________________________________________
>
>
> "Marko" <Marko@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:97868884-F7C6-4D3E-B238-A3E68AE71E5A@xxxxxxxxxxxxxxxx
> | Working with htm or html extensions in VBA is no problem.
> | However, I can't find any help or examples on how to open, modify and save
> | txt file in VBA.
> | ActiveDocument returns nothing, so I am kind of stuck. Any ideas would be
> | appreciated.
> | My goal is not to save the file to C:/, but to a folder in a currently open
> | site.
>
>
>
.
- Follow-Ups:
- Re: How do you modify and save txt or xml file using FP VBA or via
- From: Thomas A. Rowe
- Re: How do you modify and save txt or xml file using FP VBA or via
- References:
- How do you modify and save txt or xml file using FP VBA or via Add
- From: Marko
- Re: How do you modify and save txt or xml file using FP VBA or via Add
- From: Stefan B Rusynko
- How do you modify and save txt or xml file using FP VBA or via Add
- Prev by Date: Re: active content
- Next by Date: Re: How do you modify and save txt or xml file using FP VBA or via
- Previous by thread: Re: How do you modify and save txt or xml file using FP VBA or via Add
- Next by thread: Re: How do you modify and save txt or xml file using FP VBA or via
- Index(es):
Relevant Pages
|