RTF UserForm Run-time error question

Hello,

I hope someone can help me with an issue I am up against.

Our main software program uses RTF formatted documents to create merge 
documents using the data from the program.  We don't have an option, we must 
use RTF.

I have recently been assigned a project to create a large merge document.  I 
have created a UserForm to capture and use some data that is not available in 
the software program.  

I want this UserForm to open immediately.  I find if I use AutoOpen (set up 
connected to the document – instead of connected to the Normal.doc) when I 
try to merge this document at another PC I get a Run-time Error '91.  And the 
UserForm does not open. (If I merge it using the PC the original doc was 
created on the UserForm opens immediately and without error)

I also tried creating a Macro to manually run to open the UserForm.  And at 
another PC again I get the Run-time Error '91.  But I can hit "End" and then 
run the Macro which works.

Is there any way to program a RTF document to automatically open a UserForm 
without getting the Run-time Error no matter who is merging the document?

Thank you in advance for your help.

-- 
Nancy

0
Utf
2/23/2010 4:28:01 AM
word.docmanagement 5542 articles. 2 followers. Follow

4 Replies
1140 Views

Similar Articles

[PageSpeed] 45

You could use an autoopen() macro in a template that is stored in the Word 
startup folder to display a userform that is in that template.

The userform would then be displayed when any document is opened.

-- 
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"webeinky" <webeinky@discussions.microsoft.com> wrote in message 
news:30D16EC6-18BE-4194-8A47-B60BC8A8AE7E@microsoft.com...
> Hello,
>
> I hope someone can help me with an issue I am up against.
>
> Our main software program uses RTF formatted documents to create merge
> documents using the data from the program.  We don't have an option, we 
> must
> use RTF.
>
> I have recently been assigned a project to create a large merge document. 
> I
> have created a UserForm to capture and use some data that is not available 
> in
> the software program.
>
> I want this UserForm to open immediately.  I find if I use AutoOpen (set 
> up
> connected to the document – instead of connected to the Normal.doc) when I
> try to merge this document at another PC I get a Run-time Error '91.  And 
> the
> UserForm does not open. (If I merge it using the PC the original doc was
> created on the UserForm opens immediately and without error)
>
> I also tried creating a Macro to manually run to open the UserForm.  And 
> at
> another PC again I get the Run-time Error '91.  But I can hit "End" and 
> then
> run the Macro which works.
>
> Is there any way to program a RTF document to automatically open a 
> UserForm
> without getting the Run-time Error no matter who is merging the document?
>
> Thank you in advance for your help.
>
> -- 
> Nancy
> 

0
Doug
2/23/2010 5:55:15 AM
Doug,

Thank you for your speedy reply.

I am a bit embarassed, I'm not sure how to do what you suggest.  When I 
create the autoopen() macro for the box "Macros in:" do I us the "All active 
templates and documents" selection?

Does your suggestion affect any of the other RTF merge documents I have 
created?  I only want this UserForm to open for this one document

-- 
Nancy


"Doug Robbins - Word MVP" wrote:

> You could use an autoopen() macro in a template that is stored in the Word 
> startup folder to display a userform that is in that template.
> 
> The userform would then be displayed when any document is opened.
> 
> -- 
> Hope this helps,
> 
> Doug Robbins - Word MVP
> 
> Please reply only to the newsgroups unless you wish to obtain my services on
> a paid professional basis.
> 
> "webeinky" <webeinky@discussions.microsoft.com> wrote in message 
> news:30D16EC6-18BE-4194-8A47-B60BC8A8AE7E@microsoft.com...
> > Hello,
> >
> > I hope someone can help me with an issue I am up against.
> >
> > Our main software program uses RTF formatted documents to create merge
> > documents using the data from the program.  We don't have an option, we 
> > must
> > use RTF.
> >
> > I have recently been assigned a project to create a large merge document. 
> > I
> > have created a UserForm to capture and use some data that is not available 
> > in
> > the software program.
> >
> > I want this UserForm to open immediately.  I find if I use AutoOpen (set 
> > up
> > connected to the document – instead of connected to the Normal.doc) when I
> > try to merge this document at another PC I get a Run-time Error '91.  And 
> > the
> > UserForm does not open. (If I merge it using the PC the original doc was
> > created on the UserForm opens immediately and without error)
> >
> > I also tried creating a Macro to manually run to open the UserForm.  And 
> > at
> > another PC again I get the Run-time Error '91.  But I can hit "End" and 
> > then
> > run the Macro which works.
> >
> > Is there any way to program a RTF document to automatically open a 
> > UserForm
> > without getting the Run-time Error no matter who is merging the document?
> >
> > Thank you in advance for your help.
> >
> > -- 
> > Nancy
> > 
> 
0
Utf
2/23/2010 3:16:11 PM
You need to create a new template and then select that template in the 
Macros in: control and after creating the macro, you need to save the 
template in the Word Startup Folder.

I am  not sure why you are using RTF documents.  It sounds like you should 
be creating a template that contains an AutoNew macro that will display the 
userform when the user creates a new document from the template.

-- 
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"webeinky" <webeinky@discussions.microsoft.com> wrote in message 
news:1B9CA73A-59F9-4FFD-B1D6-7DFCFB5E31B4@microsoft.com...
> Doug,
>
> Thank you for your speedy reply.
>
> I am a bit embarassed, I'm not sure how to do what you suggest.  When I
> create the autoopen() macro for the box "Macros in:" do I us the "All 
> active
> templates and documents" selection?
>
> Does your suggestion affect any of the other RTF merge documents I have
> created?  I only want this UserForm to open for this one document
>
> -- 
> Nancy
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> You could use an autoopen() macro in a template that is stored in the 
>> Word
>> startup folder to display a userform that is in that template.
>>
>> The userform would then be displayed when any document is opened.
>>
>> -- 
>> Hope this helps,
>>
>> Doug Robbins - Word MVP
>>
>> Please reply only to the newsgroups unless you wish to obtain my services 
>> on
>> a paid professional basis.
>>
>> "webeinky" <webeinky@discussions.microsoft.com> wrote in message
>> news:30D16EC6-18BE-4194-8A47-B60BC8A8AE7E@microsoft.com...
>> > Hello,
>> >
>> > I hope someone can help me with an issue I am up against.
>> >
>> > Our main software program uses RTF formatted documents to create merge
>> > documents using the data from the program.  We don't have an option, we
>> > must
>> > use RTF.
>> >
>> > I have recently been assigned a project to create a large merge 
>> > document.
>> > I
>> > have created a UserForm to capture and use some data that is not 
>> > available
>> > in
>> > the software program.
>> >
>> > I want this UserForm to open immediately.  I find if I use AutoOpen 
>> > (set
>> > up
>> > connected to the document – instead of connected to the Normal.doc) 
>> > when I
>> > try to merge this document at another PC I get a Run-time Error '91. 
>> > And
>> > the
>> > UserForm does not open. (If I merge it using the PC the original doc 
>> > was
>> > created on the UserForm opens immediately and without error)
>> >
>> > I also tried creating a Macro to manually run to open the UserForm. 
>> > And
>> > at
>> > another PC again I get the Run-time Error '91.  But I can hit "End" and
>> > then
>> > run the Macro which works.
>> >
>> > Is there any way to program a RTF document to automatically open a
>> > UserForm
>> > without getting the Run-time Error no matter who is merging the 
>> > document?
>> >
>> > Thank you in advance for your help.
>> >
>> > -- 
>> > Nancy
>> >
>> 

0
Doug
2/23/2010 11:07:22 PM
Hi Doug,

I'm sorry it has taken me so long to reply to your post.  I do appreciate 
your speedy replies.  I got distracted with another project.

I'm not sure we are talking about the same type of UserForm.  The UserForm I 
am refering to I created in Visual Basic.

It sounds like your reply is setting up another document Template as the 
"UserForm" which would open anytime I open a Word Doc by using the AutoNew 
macro - not just the one doc I am working with?

I have programmed a "work around".  I still get the Run-time error but when 
we click on "End" it opens up the document and merges the data just fine.  I 
then start the macro I set up using Ctrl-U and that opens the UserForm I 
created for additional input.

I would prefer not to have to be messing with RTF docs.  But it is the 
format the Database Software (it is a whole program) is forcing me to use for 
merging data within their program.

Thanks again for all your help.
-- 
Nancy


"Doug Robbins - Word MVP" wrote:

> You need to create a new template and then select that template in the 
> Macros in: control and after creating the macro, you need to save the 
> template in the Word Startup Folder.
> 
> I am  not sure why you are using RTF documents.  It sounds like you should 
> be creating a template that contains an AutoNew macro that will display the 
> userform when the user creates a new document from the template.
> 
> -- 
> Hope this helps,
> 
> Doug Robbins - Word MVP
> 
> Please reply only to the newsgroups unless you wish to obtain my services on
> a paid professional basis.
> 
> "webeinky" <webeinky@discussions.microsoft.com> wrote in message 
> news:1B9CA73A-59F9-4FFD-B1D6-7DFCFB5E31B4@microsoft.com...
> > Doug,
> >
> > Thank you for your speedy reply.
> >
> > I am a bit embarassed, I'm not sure how to do what you suggest.  When I
> > create the autoopen() macro for the box "Macros in:" do I us the "All 
> > active
> > templates and documents" selection?
> >
> > Does your suggestion affect any of the other RTF merge documents I have
> > created?  I only want this UserForm to open for this one document
> >
> > -- 
> > Nancy
> >
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> You could use an autoopen() macro in a template that is stored in the 
> >> Word
> >> startup folder to display a userform that is in that template.
> >>
> >> The userform would then be displayed when any document is opened.
> >>
> >> -- 
> >> Hope this helps,
> >>
> >> Doug Robbins - Word MVP
> >>
> >> Please reply only to the newsgroups unless you wish to obtain my services 
> >> on
> >> a paid professional basis.
> >>
> >> "webeinky" <webeinky@discussions.microsoft.com> wrote in message
> >> news:30D16EC6-18BE-4194-8A47-B60BC8A8AE7E@microsoft.com...
> >> > Hello,
> >> >
> >> > I hope someone can help me with an issue I am up against.
> >> >
> >> > Our main software program uses RTF formatted documents to create merge
> >> > documents using the data from the program.  We don't have an option, we
> >> > must
> >> > use RTF.
> >> >
> >> > I have recently been assigned a project to create a large merge 
> >> > document.
> >> > I
> >> > have created a UserForm to capture and use some data that is not 
> >> > available
> >> > in
> >> > the software program.
> >> >
> >> > I want this UserForm to open immediately.  I find if I use AutoOpen 
> >> > (set
> >> > up
> >> > connected to the document – instead of connected to the Normal.doc) 
> >> > when I
> >> > try to merge this document at another PC I get a Run-time Error '91. 
> >> > And
> >> > the
> >> > UserForm does not open. (If I merge it using the PC the original doc 
> >> > was
> >> > created on the UserForm opens immediately and without error)
> >> >
> >> > I also tried creating a Macro to manually run to open the UserForm. 
> >> > And
> >> > at
> >> > another PC again I get the Run-time Error '91.  But I can hit "End" and
> >> > then
> >> > run the Macro which works.
> >> >
> >> > Is there any way to program a RTF document to automatically open a
> >> > UserForm
> >> > without getting the Run-time Error no matter who is merging the 
> >> > document?
> >> >
> >> > Thank you in advance for your help.
> >> >
> >> > -- 
> >> > Nancy
> >> >
> >> 
> 
0
Utf
3/2/2010 10:31:02 PM
Reply:

Similar Artilces:

Runtime Error: FrmResult._id.length
Hello. I have installed a CRM system and am now attempting to go through the Tutorial, to get a feel for how to use it. But anytime I try to save a record in any table (Accounts, Contacts, or Leads), I get the following error message: A Runtime Error has occurred. Line: 30 Error: 'FrmResult._id.length' is null or not an object ----------- I have searched Knowledgebase and the archive of this newsgroup, but didn't find anything. Can someone give me some clues? Thanks, Walt Nelson Hello again. Well, I found the work-around to the problem, but I'm not sure it is a ...

MFC Question
I have an MFC application that uses some business objects created a few years ago in the form of "extension dlls." I've been updating it now for quite a while. I recently got a request to develop a browser-based interface to support telecommuting staff. I have the option to develop it in Java/JSP as our company only wants to support Apache servers. But, to ease my pain, they're allowing me to run an IIS server so I can program it in .NET. My question is, how do I use my MFC business objects in a JSP or .NET web application? I simply do not want to re-write them in anyt...

Error 193
I get the following error when opening Outlook. 'Mission Control Software Update Wizard: Product ID 0 Error 193 <EVENT EVENT="Error"><ERROR ERROR_CODE="403" ID="0"/></EVENT>' Don't know if this error is generated by Outlook or an add-in like MapPoint, McAfee, or ActiveSync ...

Date and Time Stamp Missing
I have a client who has Delegate access to another's mailbox (User1) with "Send As" permissions. When this client sends email as User1, the actual sent item shows in the client's Sent Items and not in the Sent Items of User1. To combat this so that User1 knows which emails have been replied to, we set up a rule based on particular content in the email to place a copy of the sent item in the Sent Items of User1. The appropriate permissons were applied to allow this to happen. Intermittently the copies of the Sent Items have no date and time stamp attached. Time of day does no...

Corrupt DB Question
Hi everyone, I have a database that is used across multiple locations via front and back end. The shared network drive I know is backed up. My questions is if my back end becomes corrupt (hopefully it doesn't) will the backup be able to retirve the information from the prior days work. This database does not get that many records daily therefore it would not be a complete disaster but was just checking everyones opinion. Scott, That is the point of the backup, but who knows. If it is backed up on tape, I wouldn't depend on it. Whenever I am responsible for data backup, I ...

making a macro run first thing when opening a workbook
is there a way to make a macro run right away when you open a workbook???? Hi either name your macro Auto_Open() or place your code in the workbook_open event -- Regards Frank Kabel Frankfurt, Germany Dennis Schuessler wrote: > is there a way to make a macro run right away when you > open a workbook???? ...

MS XML DOM question
Hello, Do MS XML DOM's functions lock files when XML is being read/written from/to it. Thanks a lot in advance. Regards, Mark. ...

Error 0x80070057 one or more parameter values are not valid
When I try to send an outlook message to a distribution list of many emails, the message will not send and I get the following error message: !Task '[inbox name] - sending' reported error (0x80070057): 'Could not complete the operation. One or more parameter values are not valid.' Can you help me trouble shoot this? The problem seams to occure when I'm sending via bcc: and when I select multiple names directly from my address book. Thanks in advance for the help, Bob ...

Outlook Task "Update List" Issues and Questions
We use outlook to assign tasks back and forth. If one Outlook user assigns a task to someone, and then they assign it back, when the user checks it off as complete, an update is sent to the user that checked it off, because they remain on the "update list" on the details tab of the task. Anyway to turn that off so the final user does not get an update email? Thanks! You should ask in an Outlook group. -- Ed Crowley MVP - Exchange "Protecting the world from PSTs and brick backups!" <mtbcpa@yahoo.com> wrote in message news:1160754748.841489.77980@k70g2000cwa.goo...

Has anyone seen this error on EX2003 sp2, Event id 1025?
Event Type: Warning Event Source: MSExchangeIS Mailbox Store Event Category: General Event ID: 1025 Date: 7/24/2006 Time: 9:49:49 AM User: N/A Computer: SFEXCHG4 Description: An error occurred on database "First Storage Group\Mailbox Store (SFEXCHG4)". Function name or description of problem: SLINK::EcUpdate Error: 0x8004010f For more information, click http://www.microsoft.com/contentredirect.asp. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Mike, are you seeing a lot of these? It might be a "soft" error. Tak...

Outlook/Exchange calendaring question...
Our users are on Outlook XP and we are running an Exchange 2000/2003 backend. We have 3 conference rooms that can be used individually or combined into 1 large conference room. 1. Is there a way, when a user books 1 of the 3 rooms, they can receive a popup message reminding them that if they want to book two, or all three rooms then they need to select all three rooms as resources. 2. If multiple rooms are selected can an email be sent to our maintenance dept so that they can configure the room in advance? Thanks for any ideas. 1. No. 2. Not without custom code. --� Milly Staples [...

Appointments error after CRM 4.0 upgrade.
Hi everyone, I've upgraded our testing system to CRM 4.0 twice, and both times run into the same issue with apointments. When you attempt to open or create an appointment, an exception is thrown: "[FormatException: Metadata provided to duration control must have a format property of duration, found ]" I've isolated the problem to be the "actualdurationminutes" field. Somehow, during the upgrade, this field was changed from format Duration to format None. I've confirmed the "actualdurationminutes" field is correctly a Duration field on all the othe...

Goofiest Thing
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C53A9A.805732A0 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0009_01C53A9A.805732A0" ------=_NextPart_001_0009_01C53A9A.805732A0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The formula for Cell O3 is =3DVLOOKUP(TRUE,Q3:R6,2) =20 =20 =20 It works if Q4,Q5, or Q6 are TRUE, but as you can see, not for Q3.=20 =20 What could be wrong? =20 Thanks, Jim ------=_NextPart_001_0009_01C53A9A.805732A0 Content-Type: text/html; c...

onditional Formating
If I want to conditionally format a whole row, depending on the contents of just one cell in that row, can this be done? So, let's say I have the range A1:M100 I want each individual row (A to M) to be conditionally formatted if the value in the M cell of that row is <0.95, or >1.05 (2 different conditions & formats) Is this possible? Ideally without VBA, as I'm wanting to pass the technique onto staff whose Excel knowledge, is, shall we say, limited. Amy advice greatly appreciated. Jay Select all of the rows 1:100, goto CF, change Condition 1 To Formula Is, and a...

outlook.exe runtime error!
Hello! When I try to start outlook it opens the main window and pops up a dialog box Microsoft Visual C++ Runtime Library Runtime Error! Program ...OUTLOOK.EXE abnormal program termination. When I OK, the dialog as well as outlook closes. What shall I do now? :( >-----Original Message----- >Hello! >When I try to start outlook it opens the main window and >pops up a dialog box >Microsoft Visual C++ Runtime Library >Runtime Error! >Program ...OUTLOOK.EXE >abnormal program termination. >When I OK, the dialog as well as outlook closes. >What shall I do now? :( &...

Error after installing SFO CLIENT Unable to find page, Action Canc
After I have installed the SFO Client on a laptop, I get a browser error, Unable to find page, Action Cancelled, The page you are looking for is currently unavailable. The Web site might be experiencing technical difficutities, or you may need to adjust your browser settings. Any clues of what to do? Thanks Hi, I have the same problem as you, the difference is that this error appears randomly. I tried installing all of the hotfixes for SFO, service packs for Outlook, also reinstalling SFO. In this deployment we have 4 other users that does not have that problem. Anyone help? Pablo....

Help with Error Window: RULES in ERROR
Evertime I start up OL Exchange at work I get a PopUp window that says: -------------------------------------------------------- RULES in ERROR Rule Error Server - Request Client Action MoveCopy, Unable to Create Dest Msg. ---------------------------------------------------------- I deleted all my rules, and it still happens. Any Computer at work that I (only me, not others) Log on to has this Error Popup.. Any Help is greatly appreciated.. Delete and recreate your profile. -- Milly Staples [MVP - Outlook] Post all replies t...

Append to date & time
I have a date field that currently has only the month, day and year. I would like to add the time to it as well. The input to the append does not have the time. Can I format a time and have it as part of the date field? Thanks "Bunky" <Bunky@discussions.microsoft.com> wrote in message news:C4CBD02C-FEBC-4395-B14E-27C35E4FC032@microsoft.com... >I have a date field that currently has only the month, day and year. I >would > like to add the time to it as well. The input to the append does not have > the time. Can I format a time and have it as part of the d...

Highlight a cell if time for task is over one hour
Hi I would like to be able to highlight a cell to show if a start time in column a and a finish time in column f was over 1 hour. The highlighted cell could be the finish time cell or a cell next to it. Any help would be great. Thankyou Time format I have in cells is hh:mm cheers Use conditional formatting with a formula of =(F2-A2)>=--"01:00" -- HTH Bob "Steve M" <SteveM@discussions.microsoft.com> wrote in message news:E709F1D2-6681-493D-9D70-5D886D09502E@microsoft.com... > Hi > I would like to be able to highlight a cel...

Error sending info fill in form.
I made a site with a fill in form and the info will be send by email to me. I works fine when in publisher, but after uploading on the webserver I get the 404 error. This is the address at that moment: http://www.ctrackindonesia.com/index_files/--WEBBOT-SELF-- (try at www.ctrackindonesia.com) Bart Publisher 2003 Here is an article that might help: http://msmvps.com/blogs/dbartosik/archive/2006/01/07/80564.aspx DavidF "AA Arens" <bartvandongen@gmail.com> wrote in message news:1139179932.188307.303040@g43g2000cwa.googlegroups.com... > I made a site with a fill in form ...

Check last Sync Time
I have a client who's CRM system will not goback on-line. Anyone know how can I find outt the last successful synch time/date? Thanks Roger I was searching for the same subject and didn't find an answer, so I wrote a query to display this information for all users, you can filter or group on FullName if you want a specifc user: select ssi.SyncResult, ssi.StartTime-.208 as SyncStart, ssi.EndTime-.208 as SynchEnd, datediff(minute, ssi.StartTime, ssi.EndTime) as TotalTime, ssi.DataSize, ssi.InsertObjectCount, sub.FullName, sub.InternalEMailAddress from SubscriptionSyncInfo ssi...

Reminder errors
Hello, I have the following error from one of the office computers "There was a problem ready one or more of your reminders. Some reminders may not appear. The file \\Evrsvr\Personal\Pam\Outlook\backup.pst could not be accessed". After this message occurs they are kicked out of Business Vision. They just restart the app and it works fine for another couple of hours.The for no reason it doews it again. There are 12 stations and was only happening on the one computer until last night a second computer got the same error and kicked thm out of Business vision. I have tried th...

Question on multiple variables with a range
Hey there, I have no idea if what I want to do is possible or not, but I am trying to do the following: I have a table that looks something like this, except with many more companies, 12 periods per company and several accounts: Company Period Account 1 Account 2 MAINE 0901 555,149.77 (2,949.98) MAINE 0902 482,441.13 10,473.65 NH 0901 523,466.17 1,423.65 NH 0902 593,683.45 81,052.68 If I want to use another worksheet to tell me what the value in an account for a given company and for a specific period, is there a way to use "IF" functions or V...

Cell formats kep changing to "Time"
I am always changing my cell formats in one spreadsheet from time to general. I have to keep doing this over and over. Why does my spreadsheet keep changing cells' format to "Time"? I can't figure out why this is happening... Have you got any behind the scenes VBA code that formats the workboo/worksheet to Time when you open the workbook or activate the sheet? Do you get the macro warning when opening the workbook? Alt + F11 to open Visual Basic Editor. Look through your workbook Sheets and Thisworkbook modules for code. Gord Dibben MS Excel MVP On Thu, 13 Dec 2007...

Domain Controller Fail to Run
When i run microsoft CRM environment diagnostics wizard i face a warning message "Some of the domain controller do not appear to be running. The following list of servers should be checked PrivUserGroup ReportingGroup SQLAccessGroup UserGroup " ...