Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. peejaykay

    Word - Inserting formula into header

    Thank you macropod I kept trying to move the range instead of using the characters collection. Someone else had suggested using the characters collection, but I didn't know how to implement it. Thanks again, pjk
  2. peejaykay

    Word - Inserting formula into header

    Thanks macropod, but I'm trying to accomplish this without using selection, just sticking to range. The inelegant code from the beginning of the post works, but by using selection as well.
  3. peejaykay

    Word - Inserting formula into header

    The formula obviously yields an error because there isn't an integer after the + sign. I've been trying to insert the wdPageField into that position, without success. The results from the above is displayed as {EQ=(0 + ) \*MERGEFORMAT} I know what I want: Page { =(intPgNo + {PAGE \*...
  4. peejaykay

    Word - Inserting formula into header

    Gerry, Thank you for your previous posts. I guess I didn't express myself clearly. The code shown above is what I'm trying to replace, not what I'm trying to use. I shouldn't even have included it in the post. I'm trying to insert a formula with a embedded PAGE field. I can add a formula...
  5. peejaykay

    Word - Inserting formula into header

    Word VBA -How do I insert a formula into a header while still using range? I don't know how to start/end the formula field. I'm trying to insert: Page { =(intPgNo + {PAGE \* MERGEFORMAT })} The following works by switching to selection, but I have been unable to produce either the wdFieldEmpty...
  6. peejaykay

    Word - multiple fonts & fields in Header

    I have created a VB application that reads source code used to program Automatic Test Equipment, plus a database describing the interfacing. The application then creates another database which details the test and path information. Eventually, the application creates a Word document containing...
  7. peejaykay

    Word - multiple fonts & fields in Header

    This is the beginning code to establish the header: Dim i As Integer, wpNum$, oHf As HeaderFooter, r As Word.Range '------------------------- 'Clear out header / footer '------------------------- i = W.ActiveDocument.Sections.count For Each oHf In...
  8. peejaykay

    Word - multiple fonts & fields in Header

    I'm attempting to build a header with multiple font sizes and several fields. I'm using Word.Range, to set the specific header parameters. Using the range object makes formatting changes to the entire Header (the entire range), and inserted fields appear at the beginning of the header instead of...
  9. peejaykay

    Word - Limiting PageSetup to Section

    Thank you very much Gerry. As you could tell, all of my Word code was based on incorporating recorded macros. Is there a reference (online or book) that demonstrates using objects for programming all of Word's functions? The Object Browser is helpful when you know what you're looking for, but...
  10. peejaykay

    Word - Limiting PageSetup to Section

    Thank you for the post... How do you write the header information without opening the view? Do you use oHF.Range also to do that?
  11. peejaykay

    Word - Limiting PageSetup to Section

    The code from the original post is in subroutine SourceCodeHeaderSetup called from within the NewSection subroutine. I'm using VB6, and the Word object is declared a W This routine gets called as text files are read in and processed. Each file becomes a new section. The code at the end puts a...
  12. peejaykay

    Word - Limiting PageSetup to Section

    Word VBA All versions through Office 2003 - The document being generated uses "Different first page" headers for early sections. Switching to deselect "Different first page" in a later new Section header causes previous headers to switch to also reflect the same change, or to mangle the...

Part and Inventory Search

Back
Top