Re: Calling macro function from within a header/footer?



Ok. So is there anyway possible to access a field via VBA code in the
header and footers? I need to be able to set the field in a header/footer
on a page by page basis in the same way that conditional headers/footers
handle it, so that each page is unique, not just the section itself.

"Jay Freedman" <jay.freedman@xxxxxxxxxxx> wrote in message
news:c3bfo15f0qboneia64p7bq8464qikidth3@xxxxxxxxxx
> We've asked Microsoft about the ability to run VBA code from a field
> within a document. The answer is that it probably "could" be a feature
> but it won't ever be allowed -- because the ability to run arbitrary
> code from a field would be a security risk (in the antivirus security
> sense).
>
> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
>
> On Fri, 25 Nov 2005 18:03:39 -0400, "ML" <schooner@xxxxxxxxxxxxx>
> wrote:
>
>>I am not referring to Word security, I am referring to text tags to
>>indicate
>>the page level security to the reader.
>>
>>Conditional headers/footers are possible at the page level as I am using
>>them now with nested IF statements that check the page for sequence
>>numbers.
>>What I'd like to be able to do is do this in VBA code as I need to do more
>>complex checks.
>>
>>"Jezebel" <warcrimes@xxxxxxxxxxxxxx> wrote in message
>>news:e7fuYkg8FHA.2552@xxxxxxxxxxxxxxxxxxxxxxx
>>> Word documents just don't work this way. Headers and footers are
>>> displayed
>>> text. You can't run code there. Nor are they specific to the page:
>>> headers
>>> and footers belong to the section. Nor do they have security settings.
>>>
>>>
>>>
>>>
>>> "ML" <schooner@xxxxxxxxxxxxx> wrote in message
>>> news:O9t51qO8FHA.2152@xxxxxxxxxxxxxxxxxxxxxxx
>>>>I want to have a the ability for code within the header or footer to
>>>>make
>>>>use of a function. Basically I have a bunch of code within the header
>>>>that handles checking for security tag fields (sequence markers) on each
>>>>page (nested if else statements) to determine the header security
>>>>setting
>>>>for that page. I'd like to have this done in a function if possible
>>>>instead of nested statements inside the header itself.
>>>>
>>>> "Jezebel" <warcrimes@xxxxxxxxxxxxxx> wrote in message
>>>> news:%230lp5tN8FHA.3636@xxxxxxxxxxxxxxxxxxxxxxx
>>>>> The question makes no sense. Parts of a document don't 'use' a macro;
>>>>> people do. What are you trying to achieve?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> "ML" <schooner@xxxxxxxxxxxxx> wrote in message
>>>>> news:uyUQh6G8FHA.2576@xxxxxxxxxxxxxxxxxxxxxxx
>>>>>> Is it possible to have a header/footer that users a macro function to
>>>>>> set a value?


.



Relevant Pages

  • Re: Updating TOC resets starting page number - WORD 2002
    ... Are page numbers displayed in the document (in the footers, ... Do they display correctly before updating the TOC? ... headers/footers. ... This reply is posted in the Newsgroup; please post any follow question or reply ...
    (microsoft.public.word.docmanagement)
  • Re: How do I prevent spell chk from chkg headers/footers in word2003
    ... in headers/footers changes constantly, most of it names that are ... unrecognizable to spell check. ... If the headers all have the Header style, and the footers all have the ... setting through the Tools> Language> Set Language dialog. ...
    (microsoft.public.word.docmanagement)
  • Re: viewing headers, footers, footnotes, etc while using a blue backgr
    ... >I can't see information contained in headers, footers and template boxes if ... >down so all the text in the blue document canbe seen same as in the white ... has absolutely no effect on whether the headers/footers are visible. ...
    (microsoft.public.word.docmanagement)
  • Re: Viewing headers & footers by default
    ... I assume your document actually has text in the headers and/or footers. ... you probably need to go to Tools> Options and check "White space ... everytime, but I don't want to do that everytime. ... How can I change the default view to always show headers/footers? ...
    (microsoft.public.word.pagelayout)