Results 1 to 3 of 3

Thread: Word Programming -- beginner

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Question Word Programming -- beginner

    Hello, this is my first post here.

    i'm trying to make an app that opens some word documents and copies them all to a single document. i.e, it should append the contents of some selected docs to a resultant one.

    i'm doing the app in C# (i might end up doing it in vb.net in the end, at the moment i try to make a prototype work), but from what i've seen it's the same api after all so i can convert vb and vba easily. Also this forum seems specialised to office which is a good thing.

    The prob is that as a beginner, the Application and Document APIs are realy too big and i'm not sure which direction to follow.

    i tried something like
    ...
    .Selection.InsertBefore(text)
    or
    .Selection.InsertAfter(text)

    but i always get the thing inserted in the beginning of the document.

    moreover i'm almost sure that this is not the right way of doing it cause the text looses all the formating. it's just a plain string at the end and it looses color and font, bold, italic , etc

    i also tried to take ranges for the source docs and add them to the summing doc, but this was errogenous as well, saying something about ranges not being from the same story (no idea what that means).

    Can you give me any directions on how to go about this?

    thank you in advance

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Re: Word Programming -- beginner

    sorry for pushing...

    still stuck with it... any ideas???

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Word Programming -- beginner

    the best (easiest) way to find out the right way to do these things is to record a macro to do a few steps, then check the code and edit as required, you will find that the mouse won't work well in the document whie you are recording so you need to know the keyboard method to select where you want to be

    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width