This is a tough one...

I have a highly suseptible file in XML on a server with an http
address that I can access through a slew of propriatory applications.
I would like to create a copy of the file on my local drive using
VBA.
THe problem is that:


1) I can't use saveas because if I do the active document becomes the
new copy and I can't programaticly reopen the old one because the
http: address will only open throught the prop app.


2) it's XML and it goes crazy (looses the XML coding in the
background) when i select all and paste it into a new temp file.


Thanks for your help...

Re: VBA, Word, XML, Save a Copy by Cindy

Cindy
Wed Apr 18 11:27:34 CDT 2007

XML is really just a plain text file. VBA has the Open, Read, Write and
Print commands (think "streaming") that will let you open a text file,
and save it (to a different location).

Or, you can load an XML parser (such as MSXML) and use the tools it
provides to open XML in memory, then save it to a different file name.

> I have a highly suseptible file in XML on a server with an http
> address that I can access through a slew of propriatory applications.
> I would like to create a copy of the file on my local drive using
> VBA.
> THe problem is that:
>
>
> 1) I can't use saveas because if I do the active document becomes the
> new copy and I can't programaticly reopen the old one because the
> http: address will only open throught the prop app.
>
>
> 2) it's XML and it goes crazy (looses the XML coding in the
> background) when i select all and paste it into a new temp file.
>

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)