INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Need to revise those tables based on a table in excel

Need to revise those tables based on a table in excel

(OP)
My reference question: http://www.tek-tips.com/viewthread.cfm?qid=1780266...


I need to revise those tables based on a table in excel. for example all tables have 3 columns of car's name, car's year, and car's price. but I have a reference table (2 columns) in excel that says some cars have a wrong name. In other words, for example the reference table in excel says, Benz should be change with BMW and Hyundai should be change with Honda.

More explanation: I have a lot of Word documents inside a folder that I need to do the process for all of them, but if working on all files in the folder is a different topic for you, please ignore that, I'm fine with revising only 1 Word document. However, the Word document is a kind of report which includes a lot of paragraphs and lines and a few tables (the number of tables could be anything). Although tables have 3 columns, I only care about updating one of the columns (for example Car Name). Please find the attached file to see what I meant by tables.

Important: Note that in the Word tables we don't see a pure car name, for example we see Benz L9000C or Hyundai Accent 2014. but in the reference table in excel we see pure car names (with no suffix and prefix).

Thank you.

RE: Need to revise those tables based on a table in excel

Hi,

You need to post a relevant example of pure/not pure in your Word and Excel tables and your reference table and what you expect the end result to be.

This question seems to have the pure/not pure caveat, whereas your question posted in forum68: Microsoft: Office seems to ignore pure/not pure, or am I mistaken?

I have a solution based on the question you posted in forum68: Microsoft: Office. Is this question different?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
I already made it relevant please see the question on top

RE: Need to revise those tables based on a table in excel

1) put your ref table on a separate sheet. We will use the sheet as a table. Hence, any table that you want to access from Word or Excel, must be on a separate sheet. AND the sheet name will be the Table Name.

So name your Ref table sheet Car Ref.

2) In the Word Document Code Sheet, Tools > References... and drill down and check the Microsoft ActiveX Data Objects m.n Library, selecting the latest version.

3) Paste these two procedures into the Word Document code window...

CODE

Option Explicit

Sub Main()
    Dim rw As Integer, Make As String, NewMake As String
    
    With ThisDocument.Tables(1)
        For rw = 2 To .Rows.Count
            Make = .Cell(rw, 2).Range.Text
            Make = Left(Make, Len(Make) - 2)
            
            Debug.Print Make
                
            NewMake = MakeRef(Make)
            
            If NewMake <> "" Then
                .Cell(rw, 2).Range.Text = NewMake
            End If
        
        Next
    End With
End Sub

Function MakeRef(Make As String) As String
    Dim sPath As String, sDB As String, sConn As String, sSQL As String
    Dim cnn As ADODB.Connection, rst As ADODB.Recordset
'Put your path in the following statement:    
    sPath = "C:\Users\Skip\Downloads"
    sDB = "car_name_example.xlsx"
'https://www.connectionstrings.com/excel-2013/
    sConn = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};"
    sConn = sConn & "DBQ=" & sPath & "\" & sDB & ";"
    
    Set cnn = New ADODB.Connection
    Set rst = New ADODB.Recordset
    
    cnn.Open sConn

    sSQL = "Select Distinct "
    sSQL = sSQL & " [CarRef]"
    sSQL = sSQL & " From [Car Ref$] "
    sSQL = sSQL & " Where [fake car name] = '" & Make & "'"
    
    rst.Open sSQL, cnn, adOpenStatic, adLockReadOnly, adCmdText
    
    On Error Resume Next
    
    rst.MoveFirst
    
    If Err.Number = 0 Then
        MakeRef = rst(0).Value
    Else        'no Part Number
        MakeRef = ""
        Debug.Print sSQL
        Err.Clear
    End If
    
    rst.Close
    cnn.Close
    
    Set rst = Nothing
    Set cnn = Nothing
End Function 

4) Run Main.

BTW, your Excel table must have headings in row 1 starting in column A.

NOTE: This assumes that the target table in Word is the FIRST TABLE.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
I receive a run time error (5941) for the following line which says: The requested number of the collection doesn't exist.

With ThisDocument.Tables(1)

RE: Need to revise those tables based on a table in excel

If this code is in your Word document, then "The requested number of the collection doesn't exist." means that you don't have a Word Table Object in your document.

Plz upload/attach your Word document. I'll take a look.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
It has 4 tables in it. Sorry it is not secure if I upload the document here (in public area). I can send it to your email if you mind.

RE: Need to revise those tables based on a table in excel

1) I have your document named...

to send Summary_AD1-001.doc


NO TABLES in this doc! OOPS, I see 5 tables.
NO VBA CODE in this doc!

Where is the code I sent you?

??????

Did you send the correct file?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

Okay, I added in my code and modified to accommodate you document ie all tables. Word file attached containing my VBA code.

Here are the changes I made. Notice the SPACE PADDING in the first 5 rows of changes. This is exactly what you have in your Excel table...
AD1-001 C|AD1-001|Z2-002    |Z2-002     C|
AD1-001 E|AD1-001|Z2-002    |Z2-002     E|
AD1-001 C|AD1-001|Z2-002    |Z2-002     C|
AD1-001 C|AD1-001|Z2-002    |Z2-002     C|
AD1-001 C|AD1-001|Z2-002    |Z2-002     C|
AD1-008 C|AD1-008|AA2-086|AA2-086 C|
AD1-008 E|AD1-008|AA2-086|AA2-086 E|
AD1-010 C|AD1-010|AA2-088   |AA2-088    C|
AD1-010 E|AD1-010|AA2-088   |AA2-088    E|
AD1-016 C|AD1-016|AA2-057|AA2-057 C|
AD1-016 E|AD1-016|AA2-057|AA2-057 E|
AD1-017 C|AD1-017|AA2-165|AA2-165 C|
AD1-017 E|AD1-017|AA2-165|AA2-165 E|
AA1-053|AA1-053|DD-Ata|DD-Ata|
 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

And now some suggestions.

1) Remove the following SPACES in your Excel table.

2) Run the entire process from Excel. You could use the workbook containing your tables that Word will query, to house and run your code.

The code can be constructed to loop through all the files in a folder. I assume that these ALL would be he Word documents that have tables to manipulate.

I coded this as 1) proof of concept and 2) as an example for you to use. Tek-Tips is just that: Tips for members who perform the work.

Are you ready to code?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

On Aug 30 17:50

Quote:


1) put your ref table on a separate sheet. We will use the sheet as a table. Hence, any table that you want to access from Word or Excel, must be on a separate sheet. AND the sheet name will be the Table Name.

So name your Ref table sheet Car Ref.

2) In the Word Document Code Sheet, Tools > References... and drill down and check the Microsoft ActiveX Data Objects m.n Library, selecting the latest version.

3) Paste these two procedures into the Word Document code window...

You seem to have totally ignored...
1) You never changed the Sheet name in your Excel reference file
2) You never added a Tools > References... object library in your Word documunt VBA
3) You never pasted the 2 procedures into the Word Document code window.

???

Well, as it turns out, you also changed things up a bit and now instead of motor cars you habe electrical transmission busses, it seems. Not a problem. So now I made the Excel sheet name is Bus Ref.

But we havn't got to adopting my other suggestions. So please stick with running the replace process from Word, until we agree that my code is doing what you intended and get some understanding of the code.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
1)My Bus Ref sheet is a separate sheet named "Bus Ref" in C:\Users\modira\Downloads\my word files\Bus Ref.xlsx
2)I already added the object library in my Word documunt VBA window
3)the following code is what I posted in my Word documunt VBA window
4)As you can see, I also changed my reference excel file's name to Bus Ref and mentioned it into the code as well.

did I do wrong?




CODE

Option Explicit

Sub Main()
    Dim rw As Integer, Make As String, NewMake As String
    Dim tbl As Table, NewVal As String
    
    For Each tbl In ThisDocument.Tables
        For rw = 2 To tbl.Rows.Count
            Make = tbl.Cell(rw, 2).Range.Text
            Make = Left(Make, Len(Make) - 2)
            Make = Split(Make, " ")(0)
           
            NewMake = MakeRef(Make)
            
            
            If NewMake <> "" Then
                NewVal = Replace(tbl.Cell(rw, 2).Range.Text, Make, NewMake)
                NewVal = Left(NewVal, Len(NewVal) - 2)
                Debug.Print tbl.Cell(rw, 2).Range.Text & "|" & Make & "|" & NewMake & "|" & NewVal & "|"
                tbl.Cell(rw, 2).Range.Text = NewVal
            End If
        
        Next
    Next
End Sub

Function MakeRef(Make As String) As String
    Dim sPath As String, sDB As String, sConn As String, sSQL As String
    Dim cnn As ADODB.Connection, rst As ADODB.Recordset
    
    sPath = "C:\Users\Downloads\my word files"
    sDB = "Car Ref.xlsx"
'https://www.connectionstrings.com/excel-2013/
    sConn = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};"
    sConn = sConn & "DBQ=" & sPath & "\" & sDB & ";"
    
    Set cnn = New ADODB.Connection
    Set rst = New ADODB.Recordset
    
    cnn.Open sConn
'real car name   fake car name

    sSQL = "Select Distinct "
    sSQL = sSQL & " [real car name]"
    sSQL = sSQL & " From [Car Ref$] "
    sSQL = sSQL & " Where [fake car name] = '" & Make & "'"
    
    rst.Open sSQL, cnn, adOpenStatic, adLockReadOnly, adCmdText
    
    On Error Resume Next
    
    rst.MoveFirst
    
    If Err.Number = 0 Then
        MakeRef = rst(0).Value
    Else        'no Part Number
        MakeRef = ""
        Debug.Print sSQL
        Err.Clear
    End If
    
    rst.Close
    cnn.Close
    
    Set rst = Nothing
    Set cnn = Nothing
End Function 

RE: Need to revise those tables based on a table in excel

What message did you get?

I see that your code is in "Normal" New Macros not Document.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

In your Word VB Editor, go to Tools > References and list all the CHECKED libraries.

They should ALL be at the top.

Or post a pic.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
I did, now I get another error

RE: Need to revise those tables based on a table in excel

I asked for the checked boxes in Tools > References...

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
there are hundreds of references to check, if you think that should be done, so I'm starting to do that.
Here is what I checked before:

RE: Need to revise those tables based on a table in excel

(OP)
I cant select any of Microsoft ActiveX objects, I get the following error after click on OK.



this is my last update which accepted





RE: Need to revise those tables based on a table in excel

Uncheck the two ActiveX libraries and then check the 2.8 version.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
I did. I still get the same run-time error.

RE: Need to revise those tables based on a table in excel

Uncheck that one and check the 6.1

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
didn't work :(

RE: Need to revise those tables based on a table in excel

(OP)
I also went to the C:\Program Files (x86)\Common Files\microsoft shared\OFFICE16 to find the ACEODBC.DLL, but there was nothing. Then I downloaded a ACEODBC.DLL from the website bellow and I put that into the location. Now I get the following error instead.

https://www.dllme.com/dll/download/11236/ACEODBC.D...


RE: Need to revise those tables based on a table in excel

Plz upload or eMail your workbook.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
I just mailed that to you.

RE: Need to revise those tables based on a table in excel

I've slept a few years since I had to do this. You need to download the ODBC drivers. I think I'm running the 32-bit drivers on my 64-bit machine.

https://dev.mysql.com/downloads/connector/odbc/5.3...

I think that as long as they're downloaded, that the ADO will start working. Fingers crossed.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
thank you for your help, first of all I see two files to download for Windows(x86, 64-bit), which one you mean? second, unfortunately it's after business time and I cant get the permission to install the deriver. Also I'm getting ready to go home and I will back on Tuesday. However, I will check it on my own computer when I got home, I hope it works there at least :)

RE: Need to revise those tables based on a table in excel

I'd download the 64-bit.

Then open the ODBC Data Sources and see what's been loaded in the Drivers tab in the ODBC Data Source Administrator.

The proof is when you can run the Main proc with no error regarding the ADO declared variables.

If the 64's don't work, then try the 32-bit download.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
At home I get this error, do you think I need to try the drivers?
My system: Windows 10 home, 64x, Microsoft Word 2016.

RE: Need to revise those tables based on a table in excel

That means that 1) your ADO library is using the correct driver and 2) one of the fields in your query does not match a field name in your Excel table.

I'd guess that it's the fake SPACE SPACE bus name vs fake bus name

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

...and, BTW, in my post of 31 Aug 17 19:26, there was a link to an FAQ.

Since you will be doing some coding and it will include discovery, ie figuring things out, the technique described in this FAQ should be invaluable for you. I've been coding in Excel VBA for over 20 years, and I still use the Watch Window to discover things I need to know.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
You are awesome!!!! Worked finallyafro2thumbsup2 I hope it works at my office too after installing the driver. Finger crossed.

RE: Need to revise those tables based on a table in excel

Great.

Once you verify that the replace code process is working exactly as expected and that it's working @work, we can tackle the looping thru the folder and opening each doc to process each table for fake to real bus names. Here's where I'll give you tips for coding that process.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
That would be great, thanks!

RE: Need to revise those tables based on a table in excel

BTW, how much VBA coding have you done?

How would you characterize your level of:
Knowledge of Application Objects?
Knowledge of the Word Object Model?
Knowledge of the Excel Object Model?
Knowledge of tables, databases & SQL code?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Actually, my experience in writing word VBA is almost nothing. But in case of excel although I'm not professional, I did a lot of Macro (record/VBA) to facilitate some processes(data analysis). I'm not sure how much symbols, objects, methods,... are common between excel and word. However, I do understand objects, tables, arrays, and other terminologies since I am professional in Java and Matlab, and I did some android applications for mobile devises and a graphical tic-tac-toe game by Matlab. I know what do you mean by database but I never had any experience in SQL and Microsoft Access.

RE: Need to revise those tables based on a table in excel

Quote:

I am professional in Java and Matlab

You have a good basis in understanding coding. You'll be okay. We'll get you to a decent working solution.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Thank you! I'm glad to have a professional friend like you :)

RE: Need to revise those tables based on a table in excel

Just being an engineer is a plus. I have a BSEE from Lehigh, just "up the road."😉

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

I was reviewing this thread and noticed that you stated, "I have a lot of Word documents inside a folder..."

So I really should have begun the coding in Excel rather than Word, because that would have made more sense. Sorry. We will pivot soon.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Nice! I am an electrical engineering major at Drexel. Here is my LinkedIn profile: www.linkedin.com/in/atamodiri
In case of excel I'm using a Word VBA to paste all tables in excel, then I use my own Excel VBA to revise the pasted data based on the ref table. Then I have to replace (manually) each old table in the word file with new table(range) in excel. I'm not sure it helps, but if so, I can send you my codes if you mind. I can do it on Tuesday, since I'm not at office till then.

RE: Need to revise those tables based on a table in excel

Sure, do that.

Drexel was one of my choices. Spent my first 5 years in Phillie.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
SkipVought,

I requested to install the Connector/ODBC driver since 9/5/2017 but unfortunately it takes time to approve by all managers. Until then I would like to show you my Excel VBA as we discussed already. Attached. I hope you still have the Word file including the tables, so you can test the attachment.

Just to know that, when you open the attachment (excel file), on Sheet1 you will see a purple button on the top right of the sheet, if you hit the button you will see how it works. BTW, I put some message box windows during the process just to track my codes, so just hit ok till you see the result.

Note that the ref table is located on Sheet2.

Thanks

RE: Need to revise those tables based on a table in excel

I'm looking at your code.

in ImportWordTable what is your intent for this statement...

CODE

'
        With .tables(tableStart)
            'copy cell contents from Word table cells to Excel cells
            For iRow = 1 To .Rows.Count
                For iCol = 1 To .Columns.Count
Cells(resultRow, iCol) = 
   WorksheetFunction.Clean(.cell(iRow, iCol).Range.Text)
                Next iCol
                resultRow = resultRow + 1
            Next iRow
        End With 

Will resultRow always equal iRow?

What is the purpose of refTableMacro, copying the ref table into I:K on sheet 1?

I see that you're bringing the Word tables into Excel, which really isn't necessary. If you noticed, my procedure does the updating in Word. But if you want to do it in Excel and check the results before over-writing your Word tables, that's fine.

The other TOTALLY unnecessary thing that you're doing is switching the lookup column to accommodate the VLOOKUP() function. Simply use INDEX() & MATCH(). INDEX has 3 arguments:

ARG1: is the return range, in this case a single column range
ARG2: is the offset row which is what the MATCH() function returns.
ARG3: is the offset columns, in this case 1

Moving the ref table is unnecessary. Just use it where it is in sheet2.

You've made things a whole lot harder than they need to be.

I 1) made your ref table a Structured Table and 2) put a column on sheet 1 with a replacement, using INDEX() & MATCH() and some othe functions as you can see.

Next step is designing/coding the search thru the folder containing your .doc files.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

You can use the FileSystemObject.

Create a FSO object and then a FSO Folder object using FSO.GetFolder(Your folder spec)

https://msdn.microsoft.com/en-us/library/aa711216(...
https://msdn.microsoft.com/VBA/Language-Reference-...

Then use FSO File object to loop through the FSO Folder Files. It will look like this

CODE

For Each oFile in oFolder.Files

Next 

Then in your loop, open each .doc* (do not open anything that is not a .doc*)

Once opened. Loop through the tables in the file and for each fie loop through the rows, correcting fake to real.

Save & close the .doc*

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

Please be sure to read the two prior posts.

Something else I do quite often. I make a sheet that I name Factors. In Factors, I will have all sorts or reference data, most often with Named Ranges. I often had dozens of such references, depending on the scope and size of my application.

In your case I'd have a range named DocFolder, and in the cell named DocFolder would be the Folder Path. It is a much better coding strategy to store such "data" in a sheet, than have it buried deep in a code maze.

Then in my code, I would reference that cell Range Name every time necessary. This would include the Folder Spec for GetFolder and in the connection string for the query.

CODE

Set oFolder = oFSO.GetFolder([DocFolder]) 

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Thank you very much for your explanations and the details.

1. WorksheetFunction.Clean removes all nonprintable characters from text.
2. resultRow is not equal to iRow since “For icol” acts under “For iRow”
3. Copying the ref table into I:K on Sheet1 is just for visualization purposes. When I was writing the code I wanted to see every step of my revision process. This is where I agree with you that I have made things a little bit harder than they need to be, but not a whole lot harder as you said, I think so, because for using VLOOKUP I had to go this way unless I used INDEX() and MATCH() as your suggestion.
4. Although I read instruction of using INDEX() and MATCH, I didn’t use them because I’m still not sure how it works just like the VLOOKUP in my project, and how it makes the process shorter.
5. However, regardless of the process I made, I have the result at the end; now what I need is return the result back into the word file.
6. Why did I do the revision through the Eexcel Sheet instead of the Word file (directly)? Because I had no Idea how to find and address Word-tables and the Word-table-contents into the Excel VBA.
7. The following is what I found after your recommendation about GetFolder function:

CODE

Function GetFolder(strPath As String) As String
Dim fldr As FileDialog
Dim sItem As String
Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
With fldr
    .Title = "Select a Folder"
    .AllowMultiSelect = False
    .InitialFileName = strPath
    If .Show <> -1 Then GoTo NextCode
    sItem = .SelectedItems(1)
End With
NextCode:
GetFolder = sItem
Set fldr = Nothing
End Function 

RE: Need to revise those tables based on a table in excel

Your GetFolder has no resemblance at all to File Systems Objects GetFolder.

I don't see any looping for files in a folder???

Don't see any questions, so I assume you have things under control.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Please find the attached file. As you will see there are 4 tables in the Excel file (A1-C46, A48-C75, A77,-C104, AND A106-C133) imported from 4 Word-tables. Those ranges are actually table1, table2, table3, and table4. My question is how to replace word tables with the excel ranges? for example I want to replace all table1 contents in the Word with range of A1-C46 and so on.
Note that, before importing the tables in the Excel we don't know how many tables with how many rows we have, so all the ranges are variable.

RE: Need to revise those tables based on a table in excel

Quote:

My question is how to replace word tables with the excel ranges? for example I want to replace all table1 contents in the Word with range of A1-C46 and so on.
Note that, before importing the tables in the Excel we don't know how many tables with how many rows we have, so all the ranges are variable.
You asked that same question weeks ago at: http://www.msofficeforums.com/word-vba/36637-repla..., where I told you there is only one line of your code you'd need to change to do that. You never bothered replying...

Please read Tek-Tip's policy on Cross-Posting: http://www.tek-tips.com/market.cfm

Cheers
Paul Edstein
[MS MVP - Word]

RE: Need to revise those tables based on a table in excel

So you have not yet installed your ODBC drivers?

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Paul Edstein,

If you take a look at your answer, you told me "I am not going to waste my time... a simple web search would turn up lots of code for exporting content from Excel to Word tables."

How you expect to receive an reply when you kick me out? I asked my question since I've never found my answer in Google.

Also, please don't make things crazy and disgracing. My last comment is not a cross posting, this is a reply to SkipVought question ("Don't see any questions, so I assume you have things under control. ")I just made an example of my original question to make it more clear for him regarding to his question.

RE: Need to revise those tables based on a table in excel

(OP)
SkipVought,

No unfortunately, it is a long process because of security purposes. do you have any substitution for sConn = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};" in your mind? so I don't have to use the ODBC driver.

RE: Need to revise those tables based on a table in excel

What I said was:

Quote:

I am not going to waste my time creating documents, tables and workbooks when, if you wanted someone to see what you're working with, you could attach your own.
I did not say you wouldn't get any help or that you were being kicked out. Since you couldn't bother attaching anything - something you have done here - the discussion went no further. Regardless, your resurrection of the same issue here IS a cross-post and you have failed to acknowledge here that you'd already been advised at MSOfficeForums that there is only one line of code you'd need to change to reverse the process. What's become apparent, IMHO, is that you expect someone else to do all the work for you.

Cheers
Paul Edstein
[MS MVP - Word]

RE: Need to revise those tables based on a table in excel

I'm posting nothing further until this matter is resolved.

Skip,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Need to revise those tables based on a table in excel

(OP)
Paul Edstein,
Seems your mind is totally negative about my work regardless of what I am doing here. As a result, I prefer to respect your mind and to stop asking more questions in this thread. Thank you for the opportunity that I have experienced in this forum to get my answer.

SkipVought,

Thank you so much for all your help and the time you spent with me. You have been very kind, helpful, and very patient about my questions.

RE: Need to revise those tables based on a table in excel

am3946: Anyone posting in forums is expected to abide by the rules of the forums concerned. One of those concerns cross-posting, which you've done a number of times without links here (e.g. http://www.tek-tips.com/viewthread.cfm?qid=1780266 where you were told clearly-enough what is expected) and, for repeated breaches at MSOfficeForums, your account there has been terminated.

In general, you're also expected to demonstrate that you're at least making an effort; we're here to help, not to do everything for you. Yet that's how far I went at http://www.msofficeforums.com/word-vba/36440-keep-... (another of your cross-posts). I hardly think anyone would interpret that as falling within your "totally negative" attribution.

Cheers
Paul Edstein
[MS MVP - Word]

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close