• File Conversion dialog don’t show (WindXP Word 2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » File Conversion dialog don’t show (WindXP Word 2003)

    Author
    Topic
    #401992

    Hi,

    I have seen the thread starting with Post 231708, but my problem is different:

    I’m opening a file with no extension, its probably a txt file. The “Tools/Optiond/General/Conferm Conversion at open” is not checked. (It probably doesn’t matter whether it is or not.)

    When I use SaveAs and gives it a filename as a txt document another dialog box opens, called File Conversion. It contains a warning of loosing formating and an Option to Insert Line breaks ending with CR/LF.

    This is actually what I want to happen, but:

    In a global template I intercept the SaveAs with a procedure:

    Public Sub FileSaveAs()
    Dim response As Variant
    Dim Prompt As String, Heading As String
    Dim Msg

    With Application.Dialogs(wdDialogFileSaveAs)
    .Name = “TypeNewName#”
    ‘ ActiveDocument.Saved = True
    response = .Show
    If response = 0 Then
    Exit Sub
    End If

    On Error Resume Next
    CUSTOMPROP = ActiveDocument.CustomDocumentProperties(“NoMacroTemplate”)

    If Err.Number 0 Then
    Exit Sub
    End If
    Err.Clear
    End With
    etc.

    When the file has been saved as MyFile.txt the File Conversion dialog box does not open and I do not get the posibility to choose the Option to Insert Line breaks ending with CR/LF, which I want.

    Anyone who can tel me why this happen and may how to get the dialog box to open?

    Thanks!

    Regards
    Bj

    Viewing 1 reply thread
    Author
    Replies
    • #796724

      Save difference in behavior in Word 2002 (XP):

      Sub SaveAsDialog()
      Dialogs(wdDialogFileSaveAs).Show
      End Sub

      Suggests that the code behind the VBA dialog and the Word command are no longer in sync, perhaps for reasons of backwards compatibility of the VBA dialog? But simply executing the Save As commandbar control doesn’t pop up the second box, either:

      Sub SaveAsCommand()
      CommandBars.FindControl(ID:=748).Execute
      End Sub

      Oh wait, we have global replacement macros already, so I’m not sure about this one.

      Difficult problem, and I have to get offline now…

      • #796736

        Hi,
        and thanks so far I’ll try it.

        Regards
        Bj

      • #796737

        Hi,
        and thanks so far I’ll try it.

        Regards
        Bj

      • #796744

        Hi,

        The first works, I use the same in the with… procedure and the second one generates an error.

        It looks to me that when intercepting the FileSaveAs command the File Conversion dialog will not be initialized. For some reason Word does not recognize it as a txt file in order to insert CR/LF(?)

        Don’t know what more to try, its too late in the evening.

        Regards
        Bj

      • #796745

        Hi,

        The first works, I use the same in the with… procedure and the second one generates an error.

        It looks to me that when intercepting the FileSaveAs command the File Conversion dialog will not be initialized. For some reason Word does not recognize it as a txt file in order to insert CR/LF(?)

        Don’t know what more to try, its too late in the evening.

        Regards
        Bj

    • #796725

      Save difference in behavior in Word 2002 (XP):

      Sub SaveAsDialog()
      Dialogs(wdDialogFileSaveAs).Show
      End Sub

      Suggests that the code behind the VBA dialog and the Word command are no longer in sync, perhaps for reasons of backwards compatibility of the VBA dialog? But simply executing the Save As commandbar control doesn’t pop up the second box, either:

      Sub SaveAsCommand()
      CommandBars.FindControl(ID:=748).Execute
      End Sub

      Oh wait, we have global replacement macros already, so I’m not sure about this one.

      Difficult problem, and I have to get offline now…

    Viewing 1 reply thread
    Reply To: File Conversion dialog don’t show (WindXP Word 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: