word 2007: how to make File Conversion window not appear

dgr7

Board Regular
Joined
Apr 5, 2006
Messages
225
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

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
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,217,451
Messages
6,136,708
Members
450,025
Latest member
Beginner52

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top