Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Terry[_3_] Terry[_3_] is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting to word that can be edited Spriggsy Microsoft Word Help 3 April 27th 06 12:09 PM
How to hide changes in edited Word doc? sknrss Microsoft Word Help 2 March 29th 06 11:59 PM
detect and repair fiona nelson Microsoft Word Help 3 March 31st 05 06:31 AM
Reviewed and edited Word document sent to another Gordon Ellison via OfficeKB.com New Users 1 March 28th 05 08:46 PM
Detect and repair... Phillip Formatting Long Documents 1 December 1st 04 08:16 AM


All times are GMT +1. The time now is 03:31 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"