Graham
Thu Feb 21 23:17:14 PST 2008
If you save macros in a document then a user can re-enable them. The only
solution is to remove them. You can do this with the macro organizer, or you
could save as RTF which does not support macros eg
Dim sFname As String
With ActiveDocument
If .Path = "" Then
.Save
End If
sFname = .FullName
sFname = Left(sFname, Len(sFname) - 3)
MsgBox sFname
.SaveAs FileName:=sFname & "RTF", _
FileFormat:=wdFormatRTF
.Close
End With
Documents.Open FileName:=sFname & "RTF"
ActiveDocument.SaveAs sFname & "doc", _
FileFormat:=wdFormatDocument
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site
http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Associates wrote:
> Hi,
>
> I would like to be able to write codes to disable macros in VBA for
> office word 03 document.
>
> I wonder if anyone might be able to guide me on how to do this?
>
> Thank you in advance