Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2014, 04:02 AM
Tommes93 Tommes93 is offline VBA-Code/Makro for word file to XML Windows 7 64bit VBA-Code/Makro for word file to XML Office 2007
Novice
VBA-Code/Makro for word file to XML
 
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
  #2  
Old 03-28-2014, 01:23 PM
Larry Sulky Larry Sulky is offline VBA-Code/Makro for word file to XML Windows 7 64bit VBA-Code/Makro for word file to XML Office 2010 64bit
Novice
 
Join Date: Mar 2014
Posts: 14
Larry Sulky is on a distinguished road
Default

1. Are you looking to do this in a kind of "form" that users fill out?
2. Are you trying to hide the complex XML from the users?
3. Have you considered doing this via an HTML page using Javascript in a browser, instead of MS Word?
4. Have you considered doing this in Excel instead of Word?
Reply With Quote
  #3  
Old 03-31-2014, 12:34 AM
Tommes93 Tommes93 is offline VBA-Code/Makro for word file to XML Windows 7 64bit VBA-Code/Makro for word file to XML Office 2007
Novice
VBA-Code/Makro for word file to XML
 
Join Date: Mar 2014
Posts: 9
Tommes93 is on a distinguished road
Default

Hi
this document must be flexible so that the user is able to put an introduction, for example, in front of the "form".
the xml code is hidden.
this should be a ms word because we got all others documents like this are in word and a change would be difficult.
same with excel.
But at the moment i found a way how to start. the next thing i need to know is if there is a way to jump to the next Headline (the best way would be if i can jump through the "document structur" or "document map") And for one step it would be helpful if i can compare the levels of the Headlines ( 2.2.3 and the next level would be 2.3, so that is see how many levels are between two headlines).
an other thing is, i need to know if under my selection /selected headline is a table.
but these steps come later and i might find help for that in the vba help or google. but if you have an idea let me know.
thanks

edit:
"Selection.GoTo what:=wdGoToHeading, which:=wdGoToNext" works fine for jumping to next headers

Last edited by Tommes93; 03-31-2014 at 02:22 AM.
Reply With Quote
Reply

Tags
vba, word 2007, xml

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA-Code/Makro for word file to XML VBL code for automatic attachment of file into email DrLoveday1 Outlook 1 04-12-2013 05:36 AM
VBA-Code/Makro for word file to XML code "0020" appearing instead of space chracter in word docm, file radleyyeldar Word 1 07-30-2012 05:13 AM
VBA-Code/Makro for word file to XML Please Help for VBA Code for Attached File.. krishnaoptif Word VBA 3 07-17-2012 12:29 AM
Create makro that counts the number of checked tick boxes in a survey johannapaj Word VBA 0 09-05-2011 01:51 AM
Hyperlink display Erxar Word 0 08-02-2010 05:28 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft