Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-02-2012, 05:54 PM
fredep57 fredep57 is offline What am I missing to get this to work? Windows XP What am I missing to get this to work? Office 2003
Novice
What am I missing to get this to work?
 
Join Date: May 2012
Posts: 2
fredep57 is on a distinguished road
Default What am I missing to get this to work?


I have a macro that prints an invoice in word. In it I change the footer information. Now it works up to the point below

Code:
  While ActualCopies <= mCopies
    If ActualCopies = 1 Then
        WordBasic.ViewFooterOnly
        Selection.EndKey Unit:=wdLine, Extend:=wdExtend
        Selection.Delete Unit:=wdCharacter, Count:=1
        Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
        Selection.TypeText Text:="Customer Copy"
        ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Actually, it failes at the "WordBasic.ViewFooterOnly" line with the error"Runtime error '438': Object does not support this property or method"

What do I need to do/add to get this to work??
Reply With Quote
  #2  
Old 05-04-2012, 01:26 AM
macropod's Avatar
macropod macropod is offline What am I missing to get this to work? Windows 7 64bit What am I missing to get this to work? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You shouldn't need to 'seek' either the header or document views. You may also need to specify which header to update. Try:
Code:
While ActualCopies <= mCopies
  If ActualCopies = 1 Then
    With ActiveDocument.Sections.First.Headers(wdHeaderFooterPrimary).Range
      .Text = "Customer Copy"
      .Paragraphs.First.Alignment = wdAlignParagraphCenter
    End With
  etc.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing some work from work really need help lukepierce222 Word 6 04-19-2012 08:41 AM
What am I missing to get this to work? work vs regular work. and how regular work works user0044 Project 5 03-06-2012 07:28 AM
Emails have gone MISSING! skapoor Outlook 1 01-06-2012 08:51 PM
Missing files JIM1 PowerPoint 0 12-04-2011 03:01 PM
Package for CD missing?? judderbones PowerPoint 1 03-24-2011 08:56 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft