Solved

Creating word doc through outlook form

Posted on 2000-03-30
4
222 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 150 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

Increase your protection from Zero Day threats!

Running two Antivirus' is never a good idea.
Taking advantage of Multiple Security layers on the other hand can often save your hide.
See which top notch security software brands have been proven to happily coexist together.
Reduce your chances of becoming a statistic.

Question has a verified solution.

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

Are you unable to connect or configure Hotmail email account in Microsoft Outlook 2010, 2007? Or Outlook.com emails are not downloading to Outlook? Lets’ see the problem and resolve Outlook Connector error syncing folder hierarchy (0x8004102A).
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

732 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