E
Ed from AZ
I originally wrote this code for Excel/Word 2000. I am now using
2003.
The main code takes a large file and splits it up into separate files
with a ".doc" file extension using TextStream. I realize this does
not make them Word "documents". But I do want to open them in Word.
With our current set-up - and I don't know if it's that we're now in
2003 or some other setting, when my code tries to open one of these
docs, I get the conversion warning. I think this would be very
disconcerting for some of my users. Is there a way to tell Word to
just open the file as a standard Word doc?
The code I am using to open these files is in an Excel workbook and
looks like:
doc = FPath & "\" & fName & ".doc"
On Error Resume Next
Set WD = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set WD = CreateObject("Word.Application")
End If
Err.Clear
On Error GoTo 0
DoEvents
WD.Documents.Open doc
WD.Visible = True
WD.ActiveDocument.ActiveWindow.WindowState =
wdWindowStateMaximize
Any help is greatly appreciated.
Ed
2003.
The main code takes a large file and splits it up into separate files
with a ".doc" file extension using TextStream. I realize this does
not make them Word "documents". But I do want to open them in Word.
With our current set-up - and I don't know if it's that we're now in
2003 or some other setting, when my code tries to open one of these
docs, I get the conversion warning. I think this would be very
disconcerting for some of my users. Is there a way to tell Word to
just open the file as a standard Word doc?
The code I am using to open these files is in an Excel workbook and
looks like:
doc = FPath & "\" & fName & ".doc"
On Error Resume Next
Set WD = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set WD = CreateObject("Word.Application")
End If
Err.Clear
On Error GoTo 0
DoEvents
WD.Documents.Open doc
WD.Visible = True
WD.ActiveDocument.ActiveWindow.WindowState =
wdWindowStateMaximize
Any help is greatly appreciated.
Ed