Re: Calling macro function from within a header/footer?
- From: "Greg Maxey" <gmaxey@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 26 Nov 2005 10:37:40 -0500
You aren't the first -- or the last -- to ask for something like this,
for security levels or revision dates or similar page-by-page info.
There has never been a satisfactory answer within Word.
Jay,
I don't agree with you here. The method that Peter Jamieson helped me work
out for security classification levels seems to work just fine for page by
page header/footer annotations provided the appropriate security marker is
located on each page.
See Advanced Conditional Headers and Footers here:
http://gregmaxey.mvps.org/Conditional_Headers_Footers.htm
--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
"Jay Freedman" <jay.freedman@xxxxxxxxxxx> wrote in message
news:9avgo19n5a87m499qobs8kloqpss0sssie@xxxxxxxxxx
> No. When you put a field in a header, the header shows the same field
> result on every page of the section, regardless of whether you
> manipulate the field's code manually or with VBA.
>
> If you can't do what you need with IF fields or StyleRef fields, the
> only solution is to put in section breaks so that each page is a
> separate section, with Same As Previous turned off, and have a macro
> insert the appropriate text (not a field) directly into each section's
> header.
>
> You aren't the first -- or the last -- to ask for something like this,
> for security levels or revision dates or similar page-by-page info.
> There has never been a satisfactory answer within Word.
>
> --
> 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 Sat, 26 Nov 2005 07:29:46 -0400, "ML" <schooner@xxxxxxxxxxxxx>
> wrote:
>
>>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?
>>
.
- Follow-Ups:
- Re: Calling macro function from within a header/footer?
- From: Jay Freedman
- Re: Calling macro function from within a header/footer?
- References:
- Calling macro function from within a header/footer?
- From: ML
- Re: Calling macro function from within a header/footer?
- From: Jezebel
- Re: Calling macro function from within a header/footer?
- From: ML
- Re: Calling macro function from within a header/footer?
- From: Jezebel
- Re: Calling macro function from within a header/footer?
- From: ML
- Re: Calling macro function from within a header/footer?
- From: Jay Freedman
- Re: Calling macro function from within a header/footer?
- From: ML
- Re: Calling macro function from within a header/footer?
- From: Jay Freedman
- Calling macro function from within a header/footer?
- Prev by Date: Re: Calling macro function from within a header/footer?
- Next by Date: 4000 item graphing limit
- Previous by thread: Re: Calling macro function from within a header/footer?
- Next by thread: Re: Calling macro function from within a header/footer?
- Index(es):
Relevant Pages
|
|