Hi there,
I was workind in a code to:
If there's only one word app window opened, close word app without saving changes.
If there's omore than one word document opened, close the active document without saving changes.
This is the code:
(wordapp is an object classe word.application)
The code is not working
I think that the problem is within parsing "SaveChanges:=wordapp.wdDoNotSaveChanges".
Thanks.
I was workind in a code to:
If there's only one word app window opened, close word app without saving changes.
If there's omore than one word document opened, close the active document without saving changes.
This is the code:
(wordapp is an object classe word.application)
Code:
If wordapp.ActiveDocument.Name = "Capa.docx" And wordapp.Windows.Count = 1 Then
wordapp.Quit SaveChanges:=wordapp.wdDoNotSaveChanges
Else
If wordapp.ActiveDocument.Name = "Capa.docx" Then wordapp.ActiveDocument.Close SaveChanges:=wordapp.wdDoNotSaveChanges
End If
The code is not working
I think that the problem is within parsing "SaveChanges:=wordapp.wdDoNotSaveChanges".
Thanks.