Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Creating word doc through outlook form

Posted on 2000-03-30
4
Medium Priority
?
243 Views
Last Modified: 2008-02-26
I have a form in which I also want to create a word document.  I would appreciate any help or pointers to where I could get valuable help to accomplish this.
0
Comment
Question by:stino
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 2

Accepted Solution

by:
brice123 earned 600 total points
ID: 2672071
What do you really want to do?
- Attach a Word document in a form?
- Generate a Word document using data from an Outlook form?

In the first case, a custom Post form should be sufficient.
In the second case of (a custom Contact form for example), just place a command button and add a similar code :

Function CommandButtonFax_Click()  
      ' --------------------------------------------
      ' Generate a fax document in Microsoft Word 97
      ' --------------------------------------------
      ' --- Create a new instance of word application
      Set objWordApp = Item.Application.CreateObject("Word.Application")

      objWordApp.Visible = True
   
      ' --- Create a new document based on the specified template
      Set objDoc = objWordApp.Documents.Add("h:\tecdoc\templates\fax.dot", False)

      Set olMAPI = Application.GetNameSpace("MAPI")

      ' --- Replace Bookmarks with data from the current item
      objWordApp.Selection.GoTo -1,,,"To"
      objWordApp.Selection.InsertBefore item.FullName
      objWordApp.Selection.GoTo -1,,,"ToAddress"
      objWordApp.Selection.InsertBefore item.BusinessAddress
      objWordApp.Selection.GoTo -1,,,"ToPhone"
      objWordApp.Selection.InsertBefore item.BusinessTelephoneNumber
      objWordApp.Selection.GoTo -1,,,"ToFaxPhone"
      objWordApp.Selection.InsertBefore item.BusinessFaxNumber
      objWordApp.Selection.GoTo -1,,,"From"

      ' --- Get the current Outlook user
      objWordApp.Selection.InsertBefore olMAPI.CurrentUser
      objWordApp.Selection.GoTo -1,,,"Body"

      Set objWordApp = Nothing
End Function
0
 
LVL 1

Author Comment

by:stino
ID: 2673634
Option 2 hits the nail on the head.  Can I get an example of the template.

email - acastro@bel.com.bz
0
 
LVL 1

Author Comment

by:stino
ID: 2673902
Option 2 hits the nail on the head.  Can I get an example of the template.

email - acastro@bel.com.bz
0
 
LVL 1

Author Comment

by:stino
ID: 2727383
I need to find literature on this stuff.  Also, I want to format the email messages that I develop (bold, indent, etc) so If you have any ideas tell me and I'll post the question.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Changing a few Outlook Options can help keep you organized!
Outlook for dependable use in a very small business   This article is about using the Outlook application (part of Microsoft Office) in a very small business, or for homeowners where dependability and reliability are critical requirements. This …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question