Click here to Skip to main content
15,919,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFunction decorators Pin
Abin20-Nov-03 13:38
Abin20-Nov-03 13:38 
GeneralRe: Function decorators Pin
Terry O'Nolley20-Nov-03 13:50
Terry O'Nolley20-Nov-03 13:50 
GeneralRe: Function decorators Pin
Jörgen Sigvardsson20-Nov-03 14:14
Jörgen Sigvardsson20-Nov-03 14:14 
GeneralRe: Function decorators Pin
Terry O'Nolley20-Nov-03 16:14
Terry O'Nolley20-Nov-03 16:14 
GeneralRe: Function decorators Pin
Michael Dunn20-Nov-03 14:31
sitebuilderMichael Dunn20-Nov-03 14:31 
GeneralThanks to all of you Pin
Abin20-Nov-03 15:51
Abin20-Nov-03 15:51 
GeneralRe: Thanks to all of you Pin
bni77720-Nov-03 17:47
bni77720-Nov-03 17:47 
GeneralWord Automation Pin
Member 54540420-Nov-03 13:27
Member 54540420-Nov-03 13:27 
Anyone help me with automation in word...trying to get a .jpg logo in header of first page ONLY of a report?? I would appreciate some code as an example. I can load a .jpg, but it goes to the header of ALL pages right now, and thats not what I am looking for. Alos, how do I get a footer done, say with some text and page numer of report? I want to use MFC. Here is my code to load the .jpg to all pages:
// Get the documents collection and add a new document
Documents documents(application.GetDocuments());
_Document document;

document = documents.Add(&varEmpty,&varEmpty,&varEmpty,&varEmpty);
// Get the selection - this is the bit that we actually do the writing to
Selection selection(application.GetSelection());



//loads header for all pages****not what I want
Sections sections(document.GetSections()); // document is your instance of _Document
Section section1(sections.Item(1));

HeadersFooters headers(section1.GetHeaders());
HeaderFooter header(headers.Item(1));


Range rangeHeader(header.GetRange());

InlineShapes shapes(rangeHeader.GetInlineShapes());
shapes.AddPicture("C:\\Inspec\\LogoInspec.jpg", &varEmpty, &varEmpty, &varEmpty);
header.SetLinkToPrevious(FALSE);
*****************************************
Thanks for your help.Big Grin | :-D
GeneralRe: Word Automation Pin
l a u r e n20-Nov-03 13:29
l a u r e n20-Nov-03 13:29 
Generalvisual layering Pin
halblonious20-Nov-03 13:01
halblonious20-Nov-03 13:01 
GeneralRe: visual layering Pin
l a u r e n20-Nov-03 13:28
l a u r e n20-Nov-03 13:28 
GeneralRe: visual layering Pin
halblonious20-Nov-03 21:01
halblonious20-Nov-03 21:01 
Generalto confinning users for del,rename & format Pin
Mahmoud Komeily20-Nov-03 10:30
Mahmoud Komeily20-Nov-03 10:30 
GeneralRe: to confinning users for del,rename & format Pin
John R. Shaw20-Nov-03 12:33
John R. Shaw20-Nov-03 12:33 
GeneralRe: to confinning users for del,rename & format Pin
Peter Molnar20-Nov-03 13:29
Peter Molnar20-Nov-03 13:29 
QuestionQuestion of scope? Pin
dave@home20-Nov-03 9:50
dave@home20-Nov-03 9:50 
AnswerRe: Question of scope? Pin
dave@home20-Nov-03 9:56
dave@home20-Nov-03 9:56 
Generalneed help with fread Pin
ns20-Nov-03 9:47
ns20-Nov-03 9:47 
Generalcheck for tab Pin
Vancouver20-Nov-03 9:53
Vancouver20-Nov-03 9:53 
GeneralRe: check for tab Pin
ns20-Nov-03 10:02
ns20-Nov-03 10:02 
GeneralRe: need help with fread Pin
Antti Keskinen20-Nov-03 10:44
Antti Keskinen20-Nov-03 10:44 
GeneralRe: need help with fread Pin
nss20-Nov-03 10:59
nss20-Nov-03 10:59 
GeneralRe: need help with fread Pin
John R. Shaw20-Nov-03 12:17
John R. Shaw20-Nov-03 12:17 
GeneralCreateDC failure in Citrix 2003 Pin
Fred Eckertson20-Nov-03 9:24
Fred Eckertson20-Nov-03 9:24 
GeneralReading Windows data into unix Pin
Anonymous20-Nov-03 9:03
Anonymous20-Nov-03 9:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.