Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. vb to c++

vb to c++

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++help
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Barm
    wrote on last edited by
    #1

    hi all I have an application that creates a ms word document. I need to include the page number. I have posted a similar question last week but this one is more to the point. I have done my research and according to msdn, the function to use is expression.Add(PageNumberAlignment, FirstPage) WdPageNumberAlignment constants: wdAlignPageNumberCenter, wdAlignPageNumberInside, wdAlignPageNumberLeft, wdAlignPageNumberOutside, or wdAlignPageNumberRight I have no problem calling out the header and footer pop up... navigating between header and footer but I am still unable to add the page number. The above function uses the vb constants. Anyone know the c++ equivalent for these? I tried using it in C++ but its a undeclared identifier. Thanks in advance. Thomas

    S D 2 Replies Last reply
    0
    • B Barm

      hi all I have an application that creates a ms word document. I need to include the page number. I have posted a similar question last week but this one is more to the point. I have done my research and according to msdn, the function to use is expression.Add(PageNumberAlignment, FirstPage) WdPageNumberAlignment constants: wdAlignPageNumberCenter, wdAlignPageNumberInside, wdAlignPageNumberLeft, wdAlignPageNumberOutside, or wdAlignPageNumberRight I have no problem calling out the header and footer pop up... navigating between header and footer but I am still unable to add the page number. The above function uses the vb constants. Anyone know the c++ equivalent for these? I tried using it in C++ but its a undeclared identifier. Thanks in advance. Thomas

      S Offline
      S Offline
      S Douglas
      wrote on last edited by
      #2

      I haven’t tried word automation in C++ yet. In vb it’s a breeze. :) Here are some articles on the MSDN. This one shows how to get the Word DOM (Document Object Model). The function you seek should be accessible here. http://support.microsoft.com/default.aspx?scid=kb;en-us;252719[^] http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/vsofficedev.asp[^] ------------------------------- DEBUGGING : Removing the needles from the haystack.

      1 Reply Last reply
      0
      • B Barm

        hi all I have an application that creates a ms word document. I need to include the page number. I have posted a similar question last week but this one is more to the point. I have done my research and according to msdn, the function to use is expression.Add(PageNumberAlignment, FirstPage) WdPageNumberAlignment constants: wdAlignPageNumberCenter, wdAlignPageNumberInside, wdAlignPageNumberLeft, wdAlignPageNumberOutside, or wdAlignPageNumberRight I have no problem calling out the header and footer pop up... navigating between header and footer but I am still unable to add the page number. The above function uses the vb constants. Anyone know the c++ equivalent for these? I tried using it in C++ but its a undeclared identifier. Thanks in advance. Thomas

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        Barm wrote: Anyone know the c++ equivalent for these? wdAlignPageNumberLeft = 0 wdAlignPageNumberCenter = 1 wdAlignPageNumberRight = 2 wdAlignPageNumberInside = 3 wdAlignPageNumberOutside = 4


        "One must learn from the bite of the fire to leave it alone." - Native American Proverb

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups