VS 2008 Extracting Tracked Changes From A Document - Populating Array Slow
Oct 10, 2010
I have some code that is extracting tracked changes from a document. The trouble is its very slow, taking around 60 seconds to capture each tracked change. I originally thought that pagination was slowing down the code (its quite a large word document). However I have turned that off but its made no difference to the speed of the function.
[Code]...
View 3 Replies
ADVERTISEMENT
Dec 27, 2010
I have been working on a program that can extract comments / tracked changes from a word document.Its coming along okay except for trying to extract the page numbers. The properties of Revision can be extracted very quickly:
[Code]...
View 2 Replies
Apr 15, 2009
I am currently using the code below within a VB.Net application to find specific text in a Word document. The text is surrounded by symbols represented by the character codes in the .Text statement. The code below is working fine. The issue now is that sometimes the desired text within a document has been marked for deletion and appears as tracked change within the document. I would like to find only the desired text that has NOT been marked for deletion. Does anyone know of a way to determine if the found text is a deletion?
[Code]...
View 2 Replies
Feb 23, 2012
I have a text file I'm trying to pull specific data from to make a report in excel and am wanting to know if my code can be improved or if I have something wrong. If it's apparent to anyone that I should be doing something elThis code does work but, very slow. These reports take up to 20 minutes for about 100 files so I am wanting to decrease the time somehow. I have attached the whole sub in a text file, it's about 900 lines long so don't think I should post all of it. This is one part that seems to take the longest:Partial code that reads the text into a string, then each line is read to find whether it holds the data or not. Inside this while loop, I am checking numerous lines to see what they hold and extract specific items. First I verify it's a interface by checking for "line protocol".
Dim str As StreamReader = File.OpenText(filefound)
While (str.Peek <> -1)
If txtLine.Contains("line protocol") = True Then 'Found an interface,
[code].....
View 10 Replies
May 21, 2009
I'm sick today and cannot think straight but I have to get this done. I have an array: newarray() I need to populate this array if a condition applies as such:
[Code]...
View 3 Replies
Feb 2, 2012
I have a .trx file (a unit test result file) which is just xml inside and I want to read the file compare a few of the tags and change them as necessary and save the file again.
I found that VB.NET has a few tools to help so the first thing I do is load the document into an xml document which seems to work fine but I can't access any of the data I need. Right now I'm trying to access the attributes of the counters tag and change them after rerunning some of the tests.
this loads the file:
Dim Doc As XmlDocument = New XmlDocument
Doc.load("testFile.trx")
Attempted ways to access node:
[Code].....
View 2 Replies
May 26, 2010
i have an xml file that i drag drop onto a picture box and i would like to use the information in the xml file to draw a table. the values for the column widths, heights and what goes in which box are in the xml file.the table is split into three sections the title part, a header and then a body.the first challange is finding asking how i can expand what i have to withdraw all the info for the same "sections" of the table as these are contained within different parent nodes.what i have is
Dim reader As Xml.XmlReader
reader = XmlReader.Create(dragFil(0))
reader.ReadToFollowing("tgroup")[code]....
View 4 Replies
Nov 7, 2009
I was just wondering how to extract or parse any particual tags (whichever I specify) from webpages. I know how to extract text and links from webpages, but I tried to use the same method from the following code for div tags, title tags etcetera and it doesn't seem to work:
[Code]...
View 2 Replies
Jan 7, 2010
My application needs to extract an embedded file (OLE object) from an excel 2003 document to a file on disk. This file can be any type, not only an Office document. Searching in the web it seems to be possible by copying OLE object to Clipboard and later copying (binary) it to a file (¿perhaps using MemoryStream and FileStream?), but I see no working code about this.
View 1 Replies
Apr 19, 2010
I am new to the world of VB.NET and have been tasked to put together a little program to search a directory of about 2000 Excel spreadsheets and put together a list to display based on the value of a Custom Document Property within that spreadsheet file. Given that I am far from a computer programmer by education or trade, this has been an adventure.
I've gotten it to work, the results are fine. The problem is, it takes well over a minute to run. It is being run over a LAN connection. When I run it locally (using a 'test' directory of about 300 files) it executes in about 4 seconds.I'm not sure even what to expect as a reasonable execution speed, so I thought I would ask here.The code is below, if anyone thinks changes there might be of use in speeding things up.
Private Sub listByPt()
Dim di As New IO.DirectoryInfo(dir_loc)
Dim aryFiles As IO.FileInfo() = di.GetFiles("*" & ext_to_check)[code]....
View 1 Replies
Mar 5, 2012
I m trying to write a program that is mostly dynamic. This program enables the user to read in several inputs (temperature, pressure .) and perform calculations on those inputs. After that the program sends an integer to an analogue output port. The program automatically determines the number and type of the inputs. It also creates something called a variable handle for each input.This is then saved to an array input_handler(0,x). That array is sized this way input_handler(0 to 1 , 0 to 9)
0= handle (integer)
1= value (integer)
The program dynamically creates a button for every input. There also is a button for every mathematical operator. This way the user can create a function by pressing buttons.This function will be saved to a string. That string will look something like this input_handler(1,0)+ input_handler(1,4)/ input_handler(1,3)Well now Im stuck with a string and VB will obviously just print out that string instead of calculating anything. Is there any conversion I can perform so that string becomes the actual array values?
View 8 Replies
Nov 11, 2011
I am teaching myself VB with the use of a basics book, but I can't seem to find help for my project in the book.I am working on a project in which I have to open data from a csv file and use it to make graphs and analysis. The data is displayed in such a manner:
row 1: column titles
row 2: units
row 3-100: data
what I want to do is create arrays for each column in the csv, populated with the data.
View 3 Replies
Aug 22, 2011
So i have some data in an 1 dimensional array, is it possible to dump this data into a database?
View 4 Replies
Nov 8, 2011
I am writting a vb.net program that I want to read in data from Excel and then populate a multidim array with it.I have been able to import the Excel data into a DataGridView (haven't been able to go directly to an array). Now I am trying to loop through the DataGridView to populate the array.This is were I am having troubles.[code]
View 2 Replies
Dec 1, 2010
I have to convert what i put into an input box, and somehow convert that into an array.
My project is to put in some random numbers from an inputbox into a listbox, then somehow converting those numbers into an array and find the median of those numbers. I'm able to do the math, and I'm sure its probably 2 or 3 lines of code
View 7 Replies
Mar 25, 2011
how to populate a 3 column ListView with an array? I'm using this code
For k = 0 To (strArr.Length / 3) - 1
For i = 0 To 2
ThisRow(i) = strArr(i)
Next
[code]....
but I am getting the following output if I were to have the following in my array : the, quick, brown, fox, jumped, over
=================================
| Column1 | Column 2 | Column 3 |
=================================
| the | quick | brown |
| the | quick | brown |
I want it to display:
=================================
| Column1 | Column 2 | Column 3 |
=================================
| the | quick | brown |
| fox | jumped | over |
View 1 Replies
Dec 17, 2010
I am trying to design a little application that allows user to enter daily attendances for 4 weeks.exercise 11, Murachs beginning vb.net) The form consists of a combo box that list the number of weeks, text boxes to enter daily attendances fro mon - fri, a button to save the entries, a button that calculates the average weekly attendance and a button to close the form.
The issue I am having is saving the user entries. I use a 2 dimensional array with 4 rows and 5 columns. Within the click event of the save button I user a for loop to loop through the array and populate each dimension depending on the week selected. Once they are saved I clear the text boxes, set the combo box index to the next position , I.E selecting the next week unless it is week 4 hence the limit has been reached. Finally move the focus to the monday text box.
When I run the code I keep end up with 2 errors depending on how i change the code. The first is that i exceeded the index of the array and the second is that "" cannot be cast to an integer. My code thus far is shown below. I have edited the data so much that I am now just confused.
[Code]...
View 5 Replies
Jun 17, 2010
I'm looping through a zip file trying to add the file name of each file within.Is this the correct method?
Dim ZipNameArray(?)
Using zip As ZipFile = ZipFile.Read(ZipToUnpack)
For Each file In zip
[code].....
View 4 Replies
May 5, 2010
I want to modify this function to populate an array with each item in the database.
View 3 Replies
Jul 29, 2011
Currently I'm trying to fill a 3x3 square with random x's and o's to make a tic tac toegame. Unfortunately the game doesn't seem to output all the x's and o's. Logically, from what I can see, it should be able to but it's not.
Shared Sub twodimension()
Dim tic(2, 2) As String
Dim min As Integer
[code].....
View 1 Replies
Mar 23, 2009
how to go about getting data populated from a data grid view to an array of structures? I have a data grid view with 6 fields and 10 records that match elements in my array. I declared a list of songs based off of my structure Song.
[Code]....
View 6 Replies
Oct 14, 2010
it doesnt like my code:
Dim n As Integer
Dim flag As Boolean
Dim i
[code].....
View 1 Replies
May 1, 2009
I made a quick search but couldn't find any help I need to put the values of a checklist box into an array. I've found several solutions on the internet but all of these don't seem to work for integer arrays. This is what I've got so far
" Dim RemoveValues(checklistRemoveBrew.CheckedItems.Count - 1) As Integer
Dim C As Integer
For C = 0 To checklistRemoveBrew.CheckedItems.Count - 1
RemoveValues(C) = checklistRemoveBrew.CheckedItems(C)
Next "
View 4 Replies
Oct 15, 2009
I want to create a 2 dimensional array and populate it with data from database. I wrote this following code.I made some mistakes here with the arrays.
[Code]...
View 2 Replies
Oct 28, 2011
I am having issues assinging values to a multi-dimensional array.
I am trying to build a 2 col, unlimited row array and populate with data from a data reader.
Dim tblArry(,) As String = {}
If reader.HasRows Then
While reader.Read()
[Code].....
When I use a Jagged Array I can get this to work. The Reader portion is workig just fine, but the coding is just not clean for this problem.
View 1 Replies
Jan 20, 2010
I am new to VB 2008 express (I am a 'C' coder but have played with VB6 before). I am writing a simple program that will use the serial port. What I would like to do is, upon some trigger event, open a form, and depending on the amount of serial ports available, populate this form with an array of checkboxes with each check box corresponding to an available serial port. The user could then choose a port which would then determine the PortName.
View 1 Replies
May 17, 2012
Basically what I'm trying to do is this, I have 20 statements in a Select Case (right now they're just labels for my own testing), I have a random number generator that will generate a number between 1 and 20. Since I don't want the same statement to repeat during the individual run of the program I'm trying to generate a random number, then check it in a dupeCheck method, then if it isn't a dupe I'm trying to return it to the select case and put it in the array so that when I choose the next random number if it's the same the dupe check method will catch it and return a False boolean and then the random method will do a recursive call to itself to generate a new random number and the whole thing starts again. I'm populating the numbers into the select case just fine, but VB keeps telling me that my functions aren't returning values on all paths, and stepping through I can see that the recursion isn't happening and that it's just sending the repeat number back, but I can't figure out where my major issue is. I'll show you my current skeleton code for the "GuessOrDie" as well as the first manifestation of the code I wrote for it a couple of days ago (the old code had infinite recursive calls and array out of bound exceptions)
I would really love it if you guys could take a look and let me know what mistakes I'm making, I'm having big problems moving from FOR loops in java to For/Each loops in VB and I suspect that is a big part of my problem.
Current Code:
Public Class GuessOrDie
Dim questHistoryArray(19) As Integer
Dim indexCount As Integer
[Code].....
View 4 Replies
Jan 22, 2009
this is how I set up my data object for a file parser. (
Dim mytable As New List(Of String(,))()
mytable.Add(New String(4, 16) {})
and it loads mytable like this:
mytable(x)(y, i) = sToken(i)
Let me explain the indices, I have a form with a tab control. In mytable,x is the tab number. Each tab has up to 5 groups which is y. Each group has 17 text boxes, i.Each group also has 17 labels.I started looking at Me.controls, and looking at control properties like tabindex for some way to iterate through the textboxes and mytable to load the textboxes.
so I started with:
for x = 0 to 31
msgbox(group1.control(x).text
next x
and I saw how all my objects are not in sequence as it descending halfway through my label controls, then switched to my textboxes, and then seemingly finished randomly. I am at a total loss without the old index property and what I want to do is something like (forgive my syntax)
Form(0).Tab(x).group(y).textbox(i).text = mytable(x)(y, i)
I was thinking of manually setting the tabindex of all textboxes in group1 to sequential order to try something like:
group1.component.tabindex(i).text = mytable(x)(y, i)
To me this is fun and challenging, but also very frustrating and makes me miss coding in assembly As I can't seem to find any reference to the tree structure of accessing components indirectly, if that makes sense.
View 8 Replies
Feb 25, 2012
i am using VB. net 2008. I am having a hard time using this code: ("L:SWPPPSWPPPBookMerge.doc") what is the shortest method that the system will search for the document without placing the document address.
View 1 Replies
Oct 14, 2009
I have a table located in a Microsoft Word document. changes has been enabled in this document. I see that I can get the collection of revisions using "ActiveDocument.Range.Revisions" . I also see that I can tell if the revision exists inside a table using "Range.Information(wdWithInTable) " .My question is this:I really need to find out the "ID#'s" that contain a revision on the "SomeText#" column.So for example, if "Some Text 1" was revised, I need to output "ID-1".I am puzzled as to how to implement this logic. Does anyone know of a way to go about this?
View 2 Replies