Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Match the Excel File content with word document

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Match the Excel File content with word document

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Match the Excel File content with word document

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Match the Excel File content with word document

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Match the Excel File content with word document

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
merge jpg's from Excel data file into word document Ron Excel Discussion (Misc queries) 0 June 19th 08 03:23 PM
eliminating trailing zeroes imported into word document from excel file [email protected] Excel Discussion (Misc queries) 4 June 9th 07 04:08 PM
Need help on mail merge excel file into word document Lynn Excel Discussion (Misc queries) 6 April 20th 07 05:30 AM
Match fonts when inserting an excel worksheet into a word document Penny Excel Worksheet Functions 0 August 23rd 06 04:53 PM
Can I insert a word document into a new excel file ? Robyn78 Excel Discussion (Misc queries) 2 August 2nd 05 08:43 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"