Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2005
    Posts
    5

    Unanswered: Open a .doc based in a template (by code)

    I don't know if this is possible.

    I have a Word document and I would like user open it with a personalized header (that is a template).

    Any idea, please?

    Thank you.

    José

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi José

    Not quite sure what you mean by "personalised header". You'll have to expand on that one I'm afraid.

    One way to open a pre-existing doc (you need to set a reference to the word object library):
    Code:
    Dim wApp As Word.Application
    Dim wDoc As Word.Document
     
    Set wApp = New Word.Application
    Set wDoc = wApp.Documents.Open("C:\Mydoc.doc")
    wApp.Visible = True
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Nov 2005
    Posts
    5
    Thank you for your help.

    The "personalised header" is another doc (a .dot template).

    In other words: every time that a doc is open (any doc), I would like to open it using that template. So, the final doc will have the header - from the template - and the body that is the doc.

    I don't know if my poor english give you the idea...

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Your English is fine

    My knowledge of Word is not

    I will have a think and a play...
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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