hello,
I have the below VBA code that's runs well except for one problem. When the activedocumen.save as statement is reached a dialog box opens with the File Conversion choices and I have to click OK for the VBA to then continue on to the end of the subroutine.
How can I change my code so that the File Conversion window doesn't appear? Basically I don't want the user to do anything other than start the VBA code from the alt-f8 window and watch it run to completion.
thanks in advance,
david
I have the below VBA code that's runs well except for one problem. When the activedocumen.save as statement is reached a dialog box opens with the File Conversion choices and I have to click OK for the VBA to then continue on to the end of the subroutine.
How can I change my code so that the File Conversion window doesn't appear? Basically I don't want the user to do anything other than start the VBA code from the alt-f8 window and watch it run to completion.
thanks in advance,
david
Code:
Sub BRNB_ZAcctsInDAKCSForCRMs()
Application.DisplayAlerts = False
'VBA created & updated 10/01/2007, 10/17/2007 by dgr
Documents.Open Filename:="\\dgrarchitecture\c\My Documents\BRNB-ZACCT.csv", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:="", _
Encoding:=1252
Call ConvertExcelCSVOutputIntoIndividualLines
ChangeFileOpenDirectory "\\dgrarchitecture\c\My Documents\"
ActiveDocument.SaveAs Filename:="\\dgrarchitecture\c\My Documents\BRNB-ZACCT.TXT", FileFormat:=wdFormatText, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=1252, InsertLineBreaks:=False, AllowSubstitutions:=False _
, LineEnding:=wdLFOnly
Call BLUERIDGEZACCT
ActiveDocument.Save
' ActiveDocument.SaveAs Filename:="\\dgrarchitecture\c\My Documents\BRNB-ZACCT.TXT", FileFormat:=wdFormatText, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False, Encoding:=1252, InsertLineBreaks:=False, AllowSubstitutions:=False _
, LineEnding:=wdLFOnly
ActiveWindow.Close
Application.DisplayAlerts = True
End Sub