Advertisement

06.02.2008 at 04:10AM PDT, ID: 23449433
[x]
Attachment Details

How to auto delete emply lines in Word by using Access code?

Asked by angie_angie in Access Coding/Macros, Microsoft Word

Tags: Access Coding, 2003

I have a template in MS Word, I want to write Access code to fill up the empty fields where bookmarked in the template. But I encountered a prob:
In the template (see attachment), I put [bkmAddressLine1] to [bkmAddressLine5] in 5 different lines corresponding to tblClient.Address1 to tblClient.Address5 in Access. The addresses are varied in length. Some of them only filled up Address1 to Address3, leaving Address4 and Address5 empty. I don't want the empty lines, are there any ways to delete them?
Another problem is I can't write Null into Word using the code below, it'll return me an error "Invalid use of Null".Start Free Trial
1:
doc.Bookmarks("bkmAddressLine4").Range.Text = rs.Fields("Address4").Value
Attachments:
 
sample template
 
[+][-]06.02.2008 at 05:41AM PDT, ID: 21691422

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Word
Tags: Access Coding, 2003
Sign Up Now!
Solution Provided By: MikeToole
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.02.2008 at 06:02AM PDT, ID: 21691543

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.02.2008 at 06:11AM PDT, ID: 21691601

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 07:34PM PDT, ID: 21697224

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 03:06AM PDT, ID: 21698776

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.03.2008 at 04:03AM PDT, ID: 21699058

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628