vb to c++
-
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
-
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
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.
-
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
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