inserting images into file creation inline function

This is a discussion on inserting images into file creation inline function within the C++ Programming forums, part of the General Programming Boards category; I have been trying to build a better way NOT MACROS to dynamically gernerate a file with images created by ...

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    164

    Question inserting images into file creation inline function

    I have been trying to build a better way NOT MACROS to dynamically gernerate a file with images created by a program. I allow snapshots of images to be taken and store them in a temp directory and then create a word document, lay in the text and then want to insert the pics.

    So far I have only been able to do this in vb creating macros, which I am not very good at, but it works. But I just don't like the sloppy Macro dependant code.

    Been doing some searching and found some good inline function write ups but nothing specific to what I am trying to do.

    Does anyone have a good forum or idea where else I may look to find some good inline function examples for this type of inline function building, or do I just live with a macro style approach?

    Oh and I posted this in C++ because that is what my code is developed in. MS VC++ 6.0. Also not apposed to C# approach, but for the type of work I am doing I preferr my comfort zone in C++.

    Thanks for any suggestions or help-

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Ok, so let's get this clear:
    1. You have some images and then insert them into a Word document, correct?
    2. You don't want to use VB scripting/Word Macros.

    I'm absolutely sure that "inline" functions have nothing to do with the solution, so lets leave that part alone for the moment.

    As far as I'm aware, there are no trivial way to produce a Word Document without actually involving Word itself, which means that VB Macros are the easy way to solve this. Writing Word type documents from C/C++ is definitely among the "hideously complicated and sensitive to changes in versions of Word" category of programming. Not something I would recommend.

    In summary:
    Creating a HTML file (or some other non-binary file format) with your images would be doable.
    Using VB Macros in Word would be doable.
    I don't think writing a C/C++ program to produce a Word Document is a good plan.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    164
    thats what I am finding out. VB macro seems to be one of my only options or an HTML file as you suggested. Have done both.

    Thinking I will be going with INLINE macro calling a vb script. Not really what I want but, word was a kind of a requirement for what I have been asked to do. PDF was another but that gets into another whole ball of wax creating a pdf using a pdf writer type setup.

    So I think macro it is. Now I will research the best procedure for creating a word template with embedded macro.

    Thanks for the reply.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 01:13 AM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-30-2005, 12:21 AM
  4. c++ linking problem for x11
    By kron in forum Linux Programming
    Replies: 1
    Last Post: 11-19-2004, 10:18 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 06:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21