Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hi. I am attempting to get Excel to open two documents in Word, compare, merge and then copy the tracked changed per section into Excel. I have been having a LOT of trouble finding the command through VBA to complete this. I attmepted to create a Macro in Word and copy it over to Excel but it keeps giving me an error. Any help is appreciated. What I have so far: Sub Draft() Dim wdApp As Word.Application, wdDoc As Word.Document On Error Resume Next Set wdApp = GetObject("Word.Application") If Err.Number < 0 Then 'Word isn't already running Set wdApp = CreateObject("Word.Application") End If On Error GoTo 0 wdApp.Visible = True wdApp.ChangeFileOpenDirectory "C:\@Document" wdApp.ChangeFileOpenDirectory "C:\@Document" wdApp.MergeDocuments OriginalDocument:=Documents( _ "current rev.doc"), RevisedDocument:= _ Documents("new rev.doc"), Destination:=wdCompareDestinationNew, _ Granularity:=wdGranularityWordLevel, CompareFormatting:=False, _ CompareCaseChanges:=False, CompareWhitespace:=False, CompareTables:=True, _ CompareHeaders:=False, CompareFootnotes:=False, CompareTextboxes:=True, _ CompareFields:=False, CompareComments:=False, CompareMoves:=True, _ OriginalAuthor:="Author", RevisedAuthor:="Author", FormatFrom:= _ wdMergeFormatFromPrompt Dim EndRun As String EndRun = "Comparison has been entered into Excel" MsgBox (EndRun) Submitted via EggHeadCafe - Software Developer Portal of Choice WinINetHTTPSend: World's Smallest HTTP Component! http://www.eggheadcafe.com/tutorials...nd-worlds.aspx |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I convert an Excel document to a Word Document | Setting up and Configuration of Excel | |||
change excel document into word document | Excel Discussion (Misc queries) | |||
convert excel document to word document (not a picture) | Excel Discussion (Misc queries) | |||
How to change a excel document into a word document? | Excel Discussion (Misc queries) | |||
Can you transform an excel document into a word document? | Excel Discussion (Misc queries) |