totalnovice2
Registered User.
- Local time
- Today, 21:21
- Joined
- May 21, 2013
- Messages
- 36
Hi.
I have the code below and I would like to save it as a .doc file which is a 97 version, i.e FileFormat:=Word.WdSaveFormat.wdFormatDocument97
I think that i have done this the right way but the receipient of the e-mail (using office 2003) can't open the file as it says "cannot open filename etc but doesn't give a reason"
If I send a 97.doc without using the template file on the below, and just open then save&send it will open the file without issue.
PLEASE HELP!
I have the code below and I would like to save it as a .doc file which is a 97 version, i.e FileFormat:=Word.WdSaveFormat.wdFormatDocument97
I think that i have done this the right way but the receipient of the e-mail (using office 2003) can't open the file as it says "cannot open filename etc but doesn't give a reason"
If I send a 97.doc without using the template file on the below, and just open then save&send it will open the file without issue.
PLEASE HELP!
Code:
Private Sub Command152_Click()
'Declare the follwing
Dim objWord As Word.Application
'Set word as an application and make it invisible
Set objWord = CreateObject("Word.Application")
objWord.Visible = False 'True is visible
'path and name of the template
objWord.Documents.Add ("[URL="https://office.me.com/sites/radioandrigginpermits/Auto/Vod%20Permitnew.dot"]https://office.[COLOR=#ff4400]me[/COLOR].com/sites/radioandrigginpermits/Auto/Vod%20Permitnew.dot[/URL]")
'This is for the bookmark
objWord.ActiveDocument.Bookmarks("VFCS").Select
'This is the field in access that containts the data that has to be entered at the
'bookmark
objWord.Selection.Text = Forms![Front Page]![Site 2 Owner]
objWord.ActiveDocument.Bookmarks("VFNAME").Select
objWord.Selection.Text = Forms![Front Page]![Site 2 Name]
'Word (or the documentwill now open if true)
objWord.Visible = False
objWord.ActiveDocument.SaveAs2 FileName:="C:\Users\Public\" & " " & Forms![Front Page]![Combo79] & " " & "VF" & ".doc", _
FileFormat:=Word.WdSaveFormat.wdFormatDocument97
Call Mail_Radio_Outlook2("C:\Users\Public\" & " " & Forms![Front Page]![Combo79] & " " & "VF" & ".doc")
objWord.ActiveDocument.Close
Set objWord = Nothing
End Sub