PDA

View Full Version : Footer



meena11
03-02-2010, 03:26 PM
I would like help:
1. Set a document template header on the first page only to a logo dynamically read in from a file when a document is created using the template.
2. The footer on the first page only to read in an address from another document

The above I believe would have to be achieved using vb but not sure how as I am new.
I appreciate any help given.
Thanks,
Mina.

macropod
03-02-2010, 09:03 PM
Hi meena,

You don't need vba for this. To have a different first page, simply go to File|Page Setup|Layout and check the 'Different first page' option. You can then add the logo & address to the first page of the template.

It's not clear, though, why you need to garner either the logo or the address from a different file. Even so, if that's what you need, I suggest you consider using an INCLUDEPICTURE field to link to the logo and an INCLUDETEXT field to link to the address. See Word's Help file for details on both fields.

meena11
03-03-2010, 07:46 AM
i would like to have these stored in a file as all our users will have to load the logo and address for each document they create.
After 01/04 a new logo needs to be introduced and this will be dropped in the file.
The same will be done to the address in the footer.

fumei
03-03-2010, 09:42 AM
You still do not really need these stored in a file. Simply store them in the template.

"i would like to have these stored in a file as all our users will have to load the logo and address for each document they create."

This is what a template (a .DOT file) does. You put whatever you need in the .DOT file, and when you use it (File > New) the new document cloned from the template jhas whatever you need. If something changes, you change it ONCE in the template (.DOT file). Done.

However, if you insist on having in a separate file (even though you do NOT need to), then use INCLUDETEXT or INCLUDEPICTURE as macropod suggests.

macropod
03-03-2010, 01:26 PM
Hi meena,

If you're going to change logo & address on 1 April, then prepare a new template for use from that date - with the new data embedded. I wouldn't recommend using INCLUDETEXT or INCLUDEPICTURE fields to link to the data as:
1. you're still going to have to change those data, so you may as well do it in the template; and
2. unless you unlink the fields when the documents are created, documents created before the changeover will get the new logo & address next time they're opened. This has all sorts of implications, some of them with potential legal ramifications. If you use vba to blindly update the logo & address, that'll have the same implications.

Your posts make me wonder whether you're using a true Word template (ie a .dot file) or just an ordinary document that you open an make changes to. Your statement:
i would like to have these stored in a file as all our users will have to load the logo and address for each document they createsuggests it could be the latter, or that you're working with a blank template that you're then modifying for each & every letter.

meena11
03-04-2010, 07:34 AM
Hi.
Thanks for all your help but I need to have the logo and footer read in from a file.
The logo as a jpeg and the footer as text.
Could you please advise me how to do this using a vb macro?
I do not understand how headers and footers work so if you could briefly explain to me it would be great!
Many, many thanks,
Meena11

meena11
03-04-2010, 07:36 AM
I forgot to mention the footer is an address and I need to have it read in line by line. Then to output the read line as a line in the footer.
Many thanks again.
Hope you can help me with the vb code for the macro as this is becoming urgent.
Meena11

fumei
03-04-2010, 09:39 AM
I do not think you are following what macropod and I are saying.

"Thanks for all your help but I need to have the logo and footer read in from a file."

Until you can show why this is, the simple fact is...you do NOT need to read these in from a file.

"I forgot to mention the footer is an address and I need to have it read in line by line."

Why is that? if the address is:

John Glenn
123 Moonstruck St.
The Moon

Why do you need John Glenn as "a line"; "123 Moonstruck St." as a separate "line"?

What does that even mean? Does that mean put "John Glenn" into the footer, then wait for something else? WHY does it need to be line-by-line?

Again, you do NOT - as least as far as you have explained - need VBA, or anything else, to do what you say you want.

Put the content you want in the footer of the template. ANY new document cloned from the footer will have that content, and no need to pull it in from a separate file.

Perhaps you do need VBA code, but it sure does not look like it as of now. Please explain.

Also, please tell us what you have tried so far. have you even tried to record a macro to do what you say you want?

macropod
03-04-2010, 12:26 PM
I do not understand how headers and footers work so if you could briefly explain to me it would be great!Hi Meena11,

Therein lies the crux of your problem - you're presupposing a particular solution is required without understanding the basics. Plus, you haven't addressed the issue of whether you're using a true Word template (dot file) or just an ordinary document (doc file).

What is it you don't understand about headers and footers?
Have you tried creating a document or template with a 'different first page' layout (perhaps even using your header logo and address footer) as I suggested in my earlier post?
Have you tried inserting a header or footer into the first page of such a document or template and seeing what happens when you get to the second page?
Have you tried using an INCLUDEPICTURE field to link to the logo file?
Have you tried using an INCLUDETEXT field to link to the address file?

The last two are important even if you want a vba solution, since such a solution could be based on the use of such fields.