Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
detect if word has been edited
Hi,
I am opening word via VB (code below) and need to know if the user has made any edits to the doc. I know I can use wordbasic.isdocumentdirty() in a VBA as below, Private Sub Document_Close() If WordBasic.IsDocumentDirty() Then MsgBox "Doc is dirty" Else MsgBox "Doc is not dirty" End If End Sub But I do not want to use a VBA module within the Word doc if I can avoid it. Is there a way for the calling VB exe to determine IsDocumentDirty() ? VB code follows: Dim objApp As New Word.Application Dim objDoc As Word.Document objApp.Documents.Open FileName:="C:\temp\test.doc", AddToRecentFiles:=False objApp.Visible = True objApp.Activate Set objDoc = objApp.ActiveDocument MsgBox "Click to continue" objDoc.Close |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
detect if word has been edited
You got two answers to your identical question in the vba.general
newsgroup. Please don't post the same question in more than one group -- we all read (mostly) the same groups, so it wastes everyone's time. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Thu, 7 Jun 2007 10:30:53 +1000, "Terry" wrote: Hi, I am opening word via VB (code below) and need to know if the user has made any edits to the doc. I know I can use wordbasic.isdocumentdirty() in a VBA as below, Private Sub Document_Close() If WordBasic.IsDocumentDirty() Then MsgBox "Doc is dirty" Else MsgBox "Doc is not dirty" End If End Sub But I do not want to use a VBA module within the Word doc if I can avoid it. Is there a way for the calling VB exe to determine IsDocumentDirty() ? VB code follows: Dim objApp As New Word.Application Dim objDoc As Word.Document objApp.Documents.Open FileName:="C:\temp\test.doc", AddToRecentFiles:=False objApp.Visible = True objApp.Activate Set objDoc = objApp.ActiveDocument MsgBox "Click to continue" objDoc.Close |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
converting to word that can be edited | Microsoft Word Help | |||
How to hide changes in edited Word doc? | Microsoft Word Help | |||
detect and repair | Microsoft Word Help | |||
Reviewed and edited Word document sent to another | New Users | |||
Detect and repair... | Formatting Long Documents |