Hi Craig,
you have to save the document before you set wd to nothing... also,
where IS the document? Are you wanting to open a file? Make a new
document?
this is the code you posted in another thread:
'~~~~~~~~ YOUR CODE
Set wd = New Word.Application
wd.Visible = False
Set doc = wd.Documents.Open(sFileName)
doc.Variables("View").Value = "Normal"
doc.Save
Set doc = Nothing
Set wd = Nothing
'~~~~~~~~~~~~~~~
in replacing
doc.Variables("View").Value = "Normal"
with
wd.ActiveWindow.View.Type = 1
you took too much out...
~~~
also, you should do:
doc.close
before
set doc = nothing
the first argument for close is whether or not you want to save
changes... so instead of save and then close, you can do this:
doc.close -1
(-1 = value for wdSaveChanges -- and it is best to use the actual values
instead of constants when you are doing automation to you can use late
binding)
Late Binding in Microsoft Access, by Tony Toews
http://www.granite.ab.ca/access/latebinding.htm
Warm Regards,
Crystal
remote programming and training
Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace
*
have an awesome day
*