VBA, Word, XML, Save a Copy

M

Mikael.Landau

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...
 
C

Cindy M.

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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top