473,667 Members | 2,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calling MS Word Letter Wizard?

VMI
How can I call the Microsoft Word Letter Wizard from within a C# Windows
application? And once I open the Letter Wizard from the application, can I
automatically paste text on one of the fields (specifically the Delivery
Address field in Recipient Info Tab)?

I'm using VS 2005 and MS Word 2002.

Thanks.
Jun 5 '07 #1
5 1733
You need to create a COM reference to the MS Office Primary InterOp
Assemblies.

From there, you make an instance of the Word Application and away you go....

Don't forget to call Marshall.Releas eComObject(comO bjectReference) when you
are done with any COM instances you make.

"VMI" <no emailwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
How can I call the Microsoft Word Letter Wizard from within a C# Windows
application? And once I open the Letter Wizard from the application, can I
automatically paste text on one of the fields (specifically the Delivery
Address field in Recipient Info Tab)?

I'm using VS 2005 and MS Word 2002.

Thanks.

Jun 5 '07 #2
VMI
Would you have any links that would help me with that?

Thanks again.
"Scott M." <s-***@nospam.nosp amwrote in message
news:eJ******** ******@TK2MSFTN GP04.phx.gbl...
You need to create a COM reference to the MS Office Primary InterOp
Assemblies.

From there, you make an instance of the Word Application and away you
go....

Don't forget to call Marshall.Releas eComObject(comO bjectReference) when
you are done with any COM instances you make.

"VMI" <no emailwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>How can I call the Microsoft Word Letter Wizard from within a C# Windows
application? And once I open the Letter Wizard from the application, can
I automatically paste text on one of the fields (specifically the
Delivery Address field in Recipient Info Tab)?

I'm using VS 2005 and MS Word 2002.

Thanks.


Jun 5 '07 #3
"VMI" <no emailwrote in message
news:OT******** ******@TK2MSFTN GP03.phx.gbl...
Would you have any links that would help me with that?
http://support.microsoft.com/kb/819398
--
http://www.markrae.net

Jun 5 '07 #4
Hi VMI,

Since the Letter Wizard is a template, after invoking it, you will not have
full control of the dialog to enter the delivery address. I think you can
use some GUI automation library to automate the operations. For example:
http://www.ranorex.com/

To learn how to invoke the Letter Wizard in C#, you need to first know
which object model is used in Word automation, you can first record a macro
in Word to get some idea. For example, following is the VBA code needed to
invoke the Letter Wizard:

Documents.Add Template:= "C:\Program Files\Microsoft
Office\Template s\1033\Letter Wizard.wiz", NewTemplate:=Fa lse,
DocumentType:=0
Hope this helps.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 6 '07 #5
Hi VMI,

Have you seen my last reply? Please feel free to let me know if there's
anything unclear. Thanks.
Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 11 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5994
by: Eric A. Johnson | last post by:
Hi, Thanks for reading this. How do I list all possible permutations of a word? I've figured out how to get all the characters in alphabetical order. I then want to display every possible character permutation in sequence, like so: abcd abdc acbd acdb adbc adcb bacd badc bcad bcda bdac bdca cabd cadb cbad cbda cdab cdba dabc dacb dbac dbca dcab dcba This is turning out to be much more difficult than I thought it would be. It seems to...
10
3879
by: Case Nelson | last post by:
Hi there I've just been playing around with some python code and I've got a fun little optimization problem I could use some help with. Basically, the program needs to take in a random list of no more than 10 letters, and find all possible mutations that match a word in my dictionary (80k words). However a wildcard letter '?' is also an acceptable character which increases the worst case time significantly. So if the letters are check...
4
1152
by: Helen Trim | last post by:
I have an application that allows users to edit documents using Word 2000. Sometimes it opens Word but the toolbars are missing. Users find this very frustrating. I can't track it down as it is intermittent. Has anyone else had this problem? Any ideas? I create the class with: Public Class WordCreateLetterClass
2
3372
by: Colin Halliday | last post by:
I have a Word 2003 mail merge main document (form letter) that is linked to another Word document data source for the mail merge. If I open this doc using the Word GUI, it first asks me to confirm that I want to run a query to select the data from the data source file, then it opens the form letter fine. I can preview the merged records and complete a merge to a new document. I have a VB 2006 project (.net framework 2.0) which opens the...
12
10654
by: Dixie | last post by:
Is there a way to shell to Microsoft Word from Access and load a specific template - using VBA? dixie
8
13328
by: Ron B | last post by:
Help!!! What am I doing wrong? I am working with Office 2003 and am trying to create a command button on an Access form that will create a mail merge in Word from an Access table. I want to make the mail merge seamless to the user so all they have to do is click on the command button and the letters are generated. For the button I created an event procedure with the following code: Private Sub RunLetters_Click()
10
1771
by: dave | last post by:
Hello, I made a function that takes a word list (one word per line, text file) and searches for all the words in the list that are 'shifts' of eachother. 'abc' shifted 1 is 'bcd' Please take a look and tell me if this is a viable solution. def shift(word, amt): ans = ''
10
4030
by: longshan | last post by:
Hi friends, Can you help me write some code to list all the arrangement of a word? for example "unix" it has possibilities like nixu,ixun,,,and so on. I think we can get 4!(4*3*2*!)=24 possibilities But how to list them all by C? thanks
2
1836
by: whodgson | last post by:
The following code accepts a string from the user and swaps the first and last letters in each word. It prints out the original string incorrectly by dropping off the first letter of the first word. I would like to establish what error in the code is causing the first word to be mangled. #include<iostream> #include<cstring> #include<cstdlib> using namespace std; int main() { cout<<"Transposing letters in a string \n"; cout<<"Type a...
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8367
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8650
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7391
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2781
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1779
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.