The following code worked perfectly in word 2003, now in word 2007 it doesn't work if the resulting save file is on a network drive, it does however work on a local drive. We are scrathing our heads here if anyone has any ideas we would be happy to try them out.

With Options
        .LocalNetworkFile = False
        .AllowFastSave = False
        .BackgroundSave = False
        .CreateBackup = False
        .SavePropertiesPrompt = False
        .SaveInterval = 10
        .SaveNormalPrompt = False
        .DisableFeaturesbyDefault = False
    End With
    With ActiveDocument
        .ReadOnlyRecommended = False
        .EmbedTrueTypeFonts = False
        .SaveFormsData = True
        .SaveSubsetFonts = False
        .DoNotEmbedSystemFonts = True
        .Password = ""
        .WritePassword = ""
        .DisableFeatures = False
        .EmbedSmartTags = True
        .SmartTagsAsXMLProps = False
        .EmbedLinguisticData = True
    End With
    Application.DefaultSaveFormat = ""
   SaveName = ActiveDocument.FullName
   SaveName = Left(SaveName, Len(SaveName) - 3)
   SaveName = SaveName & "txt"
   ActiveDocument.SaveAs FileName:=SaveName, FileFormat:=wdFormatText, _
        LockComments:=False, Password:="", _
        AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, _
        EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _
        :=True, SaveAsAOCELetter:=False, Encoding:=1252, InsertLineBreaks:=False, _
         AllowSubstitutions:=False, LineEnding:=wdCRLF

The following code worked perfectly in word 2003, now in word 2007 it doesn't work if the resulting save file is on a network drive, it does however work on a local drive. We are scrathing our heads here if anyone has any ideas we would be happy to try them out.

With Options
        .LocalNetworkFile = False
        .AllowFastSave = False
        .BackgroundSave = False
        .CreateBackup = False
        .SavePropertiesPrompt = False
        .SaveInterval = 10
        .SaveNormalPrompt = False
        .DisableFeaturesbyDefault = False
    End With
    With ActiveDocument
        .ReadOnlyRecommended = False
        .EmbedTrueTypeFonts = False
        .SaveFormsData = True
        .SaveSubsetFonts = False
        .DoNotEmbedSystemFonts = True
        .Password = ""
        .WritePassword = ""
        .DisableFeatures = False
        .EmbedSmartTags = True
        .SmartTagsAsXMLProps = False
        .EmbedLinguisticData = True
    End With
    Application.DefaultSaveFormat = ""
   SaveName = ActiveDocument.FullName
   SaveName = Left(SaveName, Len(SaveName) - 3)
   SaveName = SaveName & "txt"
   ActiveDocument.SaveAs FileName:=SaveName, FileFormat:=wdFormatText, _
        LockComments:=False, Password:="", _
        AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, _
        EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _
        :=True, SaveAsAOCELetter:=False, Encoding:=1252, InsertLineBreaks:=False, _
         AllowSubstitutions:=False, LineEnding:=wdCRLF

try to check your Project Reference if you are using the right Library version.

try to check your Project Reference if you are using the right Library version.

Is that an option in MS Word or in the Macro itself?

In your Visual Basic Programming Language or Code Editor press F2 to see how to use those properties, methods, events of that object.

In your Visual Basic Programming Language or Code Editor press F2 to see how to use those properties, methods, events of that object.

As i said in my original post if the word document is stored on a local drive, this macro works perfectly, It doesn't work if you store the document in a network location. Hence functions and properties are being used correctly.

that Macro is a Visual Basic Code am I right?

that Macro is a Visual Basic Code am I right?

Yeah

press Alt+F11 to open Visual Basic Editor.

Click Tools in VB code Editor Look for "References" the 2003 reference is "Microsoft Office 11.0 Object Library"

is that the same version with 2007?

press Alt+F11 to open Visual Basic Editor.

Click Tools in VB code Editor Look for "References" the 2003 reference is "Microsoft Office 11.0 Object Library"

is that the same version with 2007?

No it is the 12.0 version in 2007. Just to note that in Word 2003 this macro works perfectly. So there seems to be some quirk in the new library which we can not seem to get around.

I am saying 2003 version is using 11.0 I know that the 2007 is using version 12.0 try to read my previous post again :-)

can you give me the complete code of that Macro.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.