|
-
Dec 1st, 2005, 12:39 PM
#1
Thread Starter
Junior Member
Footer and header disappeared
Hi,
I tried to set up bookmarks in Word header in MS word97, then pass values through VBA in Access 97. I save as the word doc, then I send Email and add this word doc as an attachment. However, when I open the attachment, I do not have footer and header, when I do "print preview", it shows up without images in footer and header. I do not know why?
1, Why I lost images in the header?
2, Why when I open the attachment in email, footer and header does not show. When I do view>footer and header, footer and header become editable, when close it, it disappear again. I can not view document with footer and header on it. Why???
Here is the code.
VB Code:
Set objWord = CreateObject("Word.Application")
With objWord
'Make the application visible
.Visible = True
'Open the document
.Documents.Open ("I:\PROPS\TEMP\PostProcessor-QAFORM.doc")
.ActiveDocument.Bookmarks("WONumber").Select
.Selection.Text = rsKey.Fields("WONumber")
'Move to each bookmark and insert text from the form
.ActiveDocument.Bookmarks("ContactName").Select
.Selection.Text = (CStr([Forms]![CustomerInfo]![Contact subform].[Form]![FirstName] & " " & [Forms]![CustomerInfo]![Contact subform].[Form]![LastName]))
.ActiveDocument.SaveAs FileName:="C:\TEMP\PostProcessor-QAFORM.doc", FileFormat:=wdFormatDocument
End With
objWord.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
'Quit MicrosoftWord97 and release the object variable
objWord.Quit
Set objWord = Nothing
Public Function Mailer(NameRef As String)
Dim olkapps As Outlook.Application
Dim olknamespaces As Outlook.NameSpace
Dim objmailitems As Outlook.MailItem
Set olkapps = New Outlook.Application
Set olknamespaces = GetNamespace("MAPI")
Set objmailitems = olkapps.CreateItem(olMailItem)
With objmailitems
.To = NameRef
.subject = "Key File"
.body = ""
.Importance = olImportanceHigh
.Attachments.ADD "c:\temp\LicensePack.txt"
.Attachments.ADD "C:\TEMP\PostProcessor-QAFORM.doc"
.Save
End With
Set objmailitems = Nothing
Set olknamespaces = Nothing
Set olkapps = Nothing
End Function
Edit: Added [vbcode][/vbcode] tags for more clarity. - Hack
Last edited by Hack; Dec 1st, 2005 at 12:43 PM.
-
Dec 1st, 2005, 12:44 PM
#2
Re: Footer and header disappeared
MS Word/MS Access VBA question moved to Office Development.
-
Dec 2nd, 2005, 04:35 AM
#3
Re: Footer and header disappeared
Hi,
Go to View -> Print Layout.
I think you can see the Header and Footer section now.
All other views will not show the Header and Footer part.
CS.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|