Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

WordBasic Edit auto text command

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zirac - 13 Nov 2006 16:07 GMT
I'm currently updating an old template.  When I open the template and double
click anywhere on the document, a dialog box will open and let me select from
the checkbox.  After I click OK, A line or lines will be inserted on the
letter saying that we are asking for the selected documents.  I now want to
change the test on the lines but I can't find it on the codes.  Are they
saved somewhere?  

Also, when I try to print this letter using a macro so it will print 1 in
letterhead and 1 in plain it's not printing correclty.  It's printing in 3
different pages. But it works fine if I use the normal print button.

See part of the codes below:

WordBasic.BeginDialog 400, 240, "Details"
   WordBasic.GroupBox 21, 2, 280, 200, "Select which documents are required"
   WordBasic.CheckBox 56, 16, 200, 18, "Mortgage certificate:", "Mort"
   WordBasic.CheckBox 56, 38, 200, 18, "Loan certificate:", "Loan"
WordBasic.OKButton 310, 6, 88, 21
   WordBasic.CancelButton 310, 30, 88, 21
   WordBasic.EndDialog

   Dim Lettera As Object: Set Lettera = WordBasic.CurValues.UserDialog
   WordBasic.ViewPage
   WordBasic.DisableInput 1
   n = WordBasic.Dialog.UserDialog(Lettera)
   WordBasic.DisableInput 0
   
   Mort = Lettera.Mort
   Loan = Lettera.Loan

WordBasic.ScreenUpdating 0
   WordBasic.ToolsUnprotectDocument DocumentPassword:="test"
   WordBasic.WW7_EditGoTo Destination:="s2"
   If Mort = 1 Then
       WordBasic.InsertPara
       WordBasic.InsertPara
       WordBasic.WW7_EditAutoText Name:="mortgage", InsertAs:=1, Insert:=1
   End If
   If Loan = 1 Then
       WordBasic.InsertPara
       WordBasic.InsertPara
       WordBasic.WW7_EditAutoText Name:="Loan", InsertAs:=1, Insert:=1
   End If
Cindy M. - 25 Nov 2006 11:45 GMT
Hi =?Utf-8?B?emlyYWM=?=,

> I'm currently updating an old template.  When I open the template and double
> click anywhere on the document, a dialog box will open and let me select from
> the checkbox.  After I click OK, A line or lines will be inserted on the
> letter saying that we are asking for the selected documents.  I now want to
> change the test on the lines but I can't find it on the codes.  Are they
> saved somewhere?

It's really not possible for anyone who doesn't have the document and the code
to trouble-shoot everything at this remove, especially if you don't have any
WordBasic background at all.

You may have to hire someone who does have the background, or who can analyze
and rewrite the tool in VBA. At some point, the WordBasic is just going to stop
working...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.