Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dear Sir,
I am a research student in HK. Actually i would like to find whether the document in words format include the company name in excel. I found difficuities in matching the content in Excel file (including 3,000 company name) with the words documents (around 3,000). Do you have any suggestion for above case? Thank you so much in advance. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
there are lots of things you can do quickly using macro in excel. You can
import the file names of the word documents with this code Sub Getfilenames() Folder = "c:\temp\" FName = Dir(Folder & "*.doc") RowCount = 1 Do While FName < "" Range("A" & RowCount) = FName RowCount FName = Dir() Loop end Sub You can open Word dcouments from Excel macros and get anything from insdie the word document using an Excel Macro. "Katy" wrote: Dear Sir, I am a research student in HK. Actually i would like to find whether the document in words format include the company name in excel. I found difficuities in matching the content in Excel file (including 3,000 company name) with the words documents (around 3,000). Do you have any suggestion for above case? Thank you so much in advance. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
And I bet you meant
RowCount = RowCount + 1 inside that do/loop. Joel wrote: there are lots of things you can do quickly using macro in excel. You can import the file names of the word documents with this code Sub Getfilenames() Folder = "c:\temp\" FName = Dir(Folder & "*.doc") RowCount = 1 Do While FName < "" Range("A" & RowCount) = FName RowCount FName = Dir() Loop end Sub You can open Word dcouments from Excel macros and get anything from insdie the word document using an Excel Macro. "Katy" wrote: Dear Sir, I am a research student in HK. Actually i would like to find whether the document in words format include the company name in excel. I found difficuities in matching the content in Excel file (including 3,000 company name) with the words documents (around 3,000). Do you have any suggestion for above case? Thank you so much in advance. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dear Sir,
I am apprecaited for your prompt action. Due to my limitation , my understanding of your replied is insufficient, i try to write the macro as below: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 10/13/2008 by AF ' ' Sub Getfilenames(management information system testing 1) ' Folder = "C:\Documents and Settings\user\Desktop\Factiva Result" ' FName = Dir(Folder & "*.doc") ' RowCount = 1 ' Do While FName < "" ' Range("A" & RowCount) = FName ' RowCount ' RowCount = RowCount + 1 ' FName = Dir() ' Loop ' end Sub However, i can run the macro. I think that i done something wrong. Could you please help to advise? Regards Katy "Dave Peterson" wrote: And I bet you meant RowCount = RowCount + 1 inside that do/loop. Joel wrote: there are lots of things you can do quickly using macro in excel. You can import the file names of the word documents with this code Sub Getfilenames() Folder = "c:\temp\" FName = Dir(Folder & "*.doc") RowCount = 1 Do While FName < "" Range("A" & RowCount) = FName RowCount FName = Dir() Loop end Sub You can open Word dcouments from Excel macros and get anything from insdie the word document using an Excel Macro. "Katy" wrote: Dear Sir, I am a research student in HK. Actually i would like to find whether the document in words format include the company name in excel. I found difficuities in matching the content in Excel file (including 3,000 company name) with the words documents (around 3,000). Do you have any suggestion for above case? Thank you so much in advance. -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One of the things that is wrong is that you didn't include the trailing
backslash in your folder name: Folder = "C:\Documents and Settings\user\Desktop\Factiva Result" should be: Folder = "C:\Documents and Settings\user\Desktop\Factiva Result\" And the line that only has rowcount on it should be deleted. Sub Getfilenames(management information system testing 1) Folder = "C:\Documents and Settings\user\Desktop\Factiva Result\" FName = Dir(Folder & "*.doc") RowCount = 1 Do While FName < "" Range("A" & RowCount) = FName RowCount = RowCount + 1 FName = Dir() Loop end Sub If that doesn't help, it's time to share what the problems are in more detail. Katy wrote: Dear Sir, I am apprecaited for your prompt action. Due to my limitation , my understanding of your replied is insufficient, i try to write the macro as below: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 10/13/2008 by AF ' ' Sub Getfilenames(management information system testing 1) ' Folder = "C:\Documents and Settings\user\Desktop\Factiva Result" ' FName = Dir(Folder & "*.doc") ' RowCount = 1 ' Do While FName < "" ' Range("A" & RowCount) = FName ' RowCount ' RowCount = RowCount + 1 ' FName = Dir() ' Loop ' end Sub However, i can run the macro. I think that i done something wrong. Could you please help to advise? Regards Katy "Dave Peterson" wrote: And I bet you meant RowCount = RowCount + 1 inside that do/loop. Joel wrote: there are lots of things you can do quickly using macro in excel. You can import the file names of the word documents with this code Sub Getfilenames() Folder = "c:\temp\" FName = Dir(Folder & "*.doc") RowCount = 1 Do While FName < "" Range("A" & RowCount) = FName RowCount FName = Dir() Loop end Sub You can open Word dcouments from Excel macros and get anything from insdie the word document using an Excel Macro. "Katy" wrote: Dear Sir, I am a research student in HK. Actually i would like to find whether the document in words format include the company name in excel. I found difficuities in matching the content in Excel file (including 3,000 company name) with the words documents (around 3,000). Do you have any suggestion for above case? Thank you so much in advance. -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
merge jpg's from Excel data file into word document | Excel Discussion (Misc queries) | |||
eliminating trailing zeroes imported into word document from excel file | Excel Discussion (Misc queries) | |||
Need help on mail merge excel file into word document | Excel Discussion (Misc queries) | |||
Match fonts when inserting an excel worksheet into a word document | Excel Worksheet Functions | |||
Can I insert a word document into a new excel file ? | Excel Discussion (Misc queries) |