View Single Post
 
Old 03-20-2014, 04:02 AM
Tommes93 Tommes93 is offline Windows 7 64bit Office 2007
Novice
 
Join Date: Mar 2014
Posts: 9
Tommes93 is on a distinguished road
Default VBA-Code/Makro for word file to XML

Hello,
I have the following Problem/Task. (and i think it is difficult)
We develop software and we have an onlineplatform where we can save or look for testcases.
The testcases contain the steps that are necessary to check if the new software works and has no errors.
There are different folders for different projects. And there are as many subfolders as needed for each project.
The files in the subfolders include titel, summary, preconditions, steps and expected results. These files can be created online.
If i create a file online and export it in xml, it looks like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>

<testsuite name="ORDNER" >

<testsuite name="UNTERORDNER" >

<testcase internalid="12345" name="TESTCASE001">
<version><![CDATA[1]]></version>
<summary><![CDATA[<p>summary of tc001</p>]]></summary>
<steps>
   <step>
      <step_number><![CDATA[1]]></step_number>
      <actions><![CDATA[<p>SCHRITT EINS</p>]]></actions>
      <expectedresults><![CDATA[<p>ERGEBNIS EINS</p>]]></expectedresults>
      <execution_type><![CDATA[1]]></execution_type>
   </step>
</steps>

</testcase>   

</testsuite>

</testsuite>
The task is: to create a word file where new testcases can be created.
The user writes the foldername in the target line/place, the next line is for the subfoldername.
The user can create as many lines with the subfoldername as needed.
An other line/place is for the Titel or as many steps and expected results as needed.

Now the VBA code or the makro should go through the word file and find the foldername and put it in the right place of the new generated xml file.
Also the subfolders and steps ,... should go th the right place of the xml file.
After that i can upload the xml file to our online platform and it puts the file in the right folder.

For now i dont have the right idea to start with that.
I need your help and every idea or approach can help me.

Thank you,
Tom
Reply With Quote