how do I do this 
Author Message
 how do I do this

We have a document which prints on a pre-printed form, and is also used to
make a PDF file for e-mail. For the PDF we have a macro which adds a header,
and another to remove the header. Several documents may be open at the same
time to be e-mailed. One problem we have is occasionally the header is
applied twice to a document. What could I add to the code to prevent adding
the header a second time?

Thanks,
Steve Hodgkin



Sun, 27 Mar 2005 01:26:05 GMT  
 how do I do this
You can retrieve the header through code using:

activedocument.StoryRanges(wdPrimaryHeaderStory)

Set this range to whatever you want the header to be; that will replace
anything that is there already. Or, in your current code, start by selecting
the existing header and delete it.

Use wdEvenPagesHeaderStory and wdFirstPageHeaderStory if your layout has
multiple headers.


Quote:
> We have a document which prints on a pre-printed form, and is also used to
> make a PDF file for e-mail. For the PDF we have a macro which adds a
header,
> and another to remove the header. Several documents may be open at the
same
> time to be e-mailed. One problem we have is occasionally the header is
> applied twice to a document. What could I add to the code to prevent
adding
> the header a second time?

> Thanks,
> Steve Hodgkin



Sun, 27 Mar 2005 08:39:09 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ADO thinks DBMS is done, but DBMS ain't done

2. Virtual volumes with VB5 - can it be done? How can it be done?

3. Help, can this be done with VB

4. Recordset: What am I doing wrong?

5. What am I doing wrong??

6. Run-time Error 3027 when doing AcExportMerge

7. What am I doing wrong?

8. Help with syntax. What am I doing wrong

9. What am I doing wrong?

10. Eliminating duplicate memo fields must be done !!!

11. What am I doing wrong?

12. Moving code from VBA to VB. Easily Done?

 

 
Powered by phpBB® Forum Software