How can we open a notepad, write something into it, close that file by saving it as .xml

get2noesks

New Member
Joined
Jul 15, 2015
Messages
24
Hi Team,

I was working on this XML file creation through VBA and I am stuck at a stage where I have to write the contents to notepad recursively.

For instance, i have some 10 XMLs to prepare and I want each XML to be copied in a new notepad respectively and saved with .xml extension.

Basically I need help with
1) Opening a notepad file using VBA
2) Writing the content to notepad in XML tags format.
3) Saving the notepad recursively as .xml

Please help me in this regard.

Thanks
Saurabh
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi VBA Geek,

I need VBA code to access notepad and close it as an XML. I am not sure how do these links help?

Regards
Saurabh
 
Upvote 0
Hi,

It's actually set of tags listed under a "Source System" and "Message Type" combo. Suppose A is the Source System and it has n message types; For each combination of source system and message type there are list of tags which needs to be created as separate XML file.

A-MsgType1-10 tags--> 1 XML
A-MsgType2-5 tags--> 1 XML
.
.
.
.
and so on....

Please advise on what can be done?
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,691
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top