Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2021, 05:59 PM
Formd Formd is offline VBA script to pull data into existing document Windows 7 32bit VBA script to pull data into existing document Office 2007
Advanced Beginner
VBA script to pull data into existing document
 
Join Date: Feb 2015
Location: TX
Posts: 49
Formd is on a distinguished road
Default

Let Connect = "driver={sql server};server=SERVERNAME;Database=DBNAME;UID=USRI D;PWD=PASSWOOD;"



This is how the above reads.
This is a script I met in place and wanted to tweak it.

I am trying to connect to a database and pull data from the field (usp_WordMerge_SelAddlinesByFileNumber) in the database.

Cmd1.Parameters(1).Value = "0947000" is suppose to represent the customer number but I am not sure how to make that happen. The field name is actually {CustomerID}

I am creating a loop to search all customerIDs and insert text in a bookmark until the customerID has no value or data.

I hope that make sense
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA script to pull data into existing document Applying New Multi-Level List to Existing Document with Manual Numbering and Existing Styles stanley Word 4 12-15-2020 10:59 AM
VBA script to pull data into existing document I cant get my Sum(Offset formula to pull appropriate data. Erickd90 Excel 7 07-28-2016 12:20 PM
VBA script to pull data into existing document pull data using drop down menu nfsmith Excel 8 03-23-2016 11:28 PM
Excel VBA: Pull data from web tinfanide Excel Programming 0 12-09-2011 02:11 AM
VBA script to pull data into existing document macro to pull data from multiple files psrs0810 Excel 2 10-25-2010 01:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft