A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Word Macro Conditional Statement



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 23rd 08, 11:00 PM posted to microsoft.public.outlook.program_vba
hometeamjill
external usenet poster
 
Posts: 1
Default Word Macro Conditional Statement

Hi there,

I am a medical transcriptionist with very little programming experience, but
have written a series of macros to copy/paste Word reports into my client's
Word-based document. Unfortunately, although I've written some steps into
the macro which would make it difficult to paste one patient's report into
the wrong patient's demographics, it has still happened.

When part 1 of the macro runs, this is how the patient info lines look:

Correct:

32460 reagan xr chest (obtained from demographics in client's header)
32460 reagan xr chest (from our typed report)

Incorrect:

32460 reagan xr chest
42460 reagan xr chest

As you can see, in the Incorrect sample, the numbers don't match. From what
I've gathered so far, I need to insert the two patient info lines into a
table and have the program abort if the A1 cell of the table doesn't match
the A2 cell. I would like the macro to "ABORT" if it doesn't match and
proceed with the rest of the macro if it does match.

I would really appreciate any help I can get.

Thanks a lot!
--

--
hometeamjill
Ads
  #2  
Old March 24th 08, 12:59 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Word Macro Conditional Statement

This is an Outlook group. Post this question in a Word group.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"hometeamjill" wrote in message
...
Hi there,

I am a medical transcriptionist with very little programming experience,
but
have written a series of macros to copy/paste Word reports into my
client's
Word-based document. Unfortunately, although I've written some steps into
the macro which would make it difficult to paste one patient's report into
the wrong patient's demographics, it has still happened.

When part 1 of the macro runs, this is how the patient info lines look:

Correct:

32460 reagan xr chest (obtained from demographics in client's header)
32460 reagan xr chest (from our typed report)

Incorrect:

32460 reagan xr chest
42460 reagan xr chest

As you can see, in the Incorrect sample, the numbers don't match. From
what
I've gathered so far, I need to insert the two patient info lines into a
table and have the program abort if the A1 cell of the table doesn't match
the A2 cell. I would like the macro to "ABORT" if it doesn't match and
proceed with the rest of the macro if it does match.

I would really appreciate any help I can get.

Thanks a lot!
--

--
hometeamjill


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word macro warning goran Outlook and VBA 1 December 21st 07 09:44 AM
retrieving Outlook user info from Word macro IndianSummer Outlook and VBA 1 September 29th 07 12:05 AM
If then statement Aggie G Outlook - Using Forms 3 February 2nd 07 07:50 PM
Outlook macro abends but Word macro runs successfully Jreue Outlook and VBA 0 December 13th 06 11:55 PM
Macro to search for word Dave Neve Outlook and VBA 7 July 26th 06 09:52 PM


All times are GMT +1. The time now is 07:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.