Suppression Web Properties diaglox box from save as when writing macros
Does anyone know if there is a way to suppress the web properties dialog box that is display when you save a document from word to a sharepoint site. I have a macro that is saving a number of documents to a sharepoint site and the macro fails because under certain circumstances a dialog box is shown prompting for the web properties. Note I am using words displayalerts = wdalertsnone but this does not seem to suppress the dialog.
Sub HandleWord(ByVal filepath As String, ByVal copyto As String, ByVal fname As String, ByVal htmlflag As Boolean, ByVal copyfrom As String)
On Error GoTo werr
eoffset = 24
Set odoc = doc.Documents.Open(filepath, , True)
odoc.Fields.Update
NewFile = copyto '& fname
odoc.Application.DisplayAlerts = wdAlertsNone
'odoc.Application.DisplayAlerts = False
odoc.Application.DefaultWebOptions
odoc.SaveAs (NewFile)
If (htmlflag = True) Then
NewFile = Replace(NewFile, ".doc", ".htm")
eoffset = 25
odoc.Application.DisplayAlerts = wdAlertsNone
Call odoc.SaveAs(NewFile, wdFormatHTML)
odoc.Application.DisplayAlerts = wdAlertsAll
End If
odoc.Close
Exit Sub
werr:
ActiveCell.Offset(0, eoffset).Value = Err.Description
End Sub

