<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-28492262</id><updated>2026-10-14T02:59:41.293-07:00</updated><category term="Excel VBA"/><category term="Word VBA"/><category term="Excel VBA code"/><category term="Powerpoint VBA"/><category term="VBComponents"/><category term="Windows API Functions"/><category term="WorksheetFunction Example"/><category term="Excel VBA Application.FindFormat"/><category term="Excel VBA FindFormat"/><category term="Excel VBA Tips"/><category term="Outlook VBA"/><category term="Search Formatted Text using Excel VBA"/><category term="VBProject"/><category term="Word Add-ins using VBA"/><category term="Excel VBA ListObjects"/><category term="File System Object"/><category term="Retrieve Command Line Arguments"/><category term="Split Function VBA"/><category term="Uninstall Word Addins using VBA"/><category term="VBA Create Module"/><category term="ADO in Excel"/><category term="ActiveVBProject property"/><category term="Add Command to Tools menu"/><category term="Add Control to CommandBar"/><category term="Add Legends to Chart using Excel VBA"/><category term="Add Ole Control to Word Document"/><category term="Add Shapes to Headers using Word VBA"/><category term="AddOLEControl Command Buttons"/><category term="Aligning Text File"/><category term="Aligning Text Output"/><category term="AutoFilter using Excel VBA"/><category term="AutoRecovery using Word VBA. VBA Auto Recovery"/><category term="Automate Email"/><category term="Automate Powerpoint"/><category term="Calculate Workdays - Excel VBA"/><category term="Case in-sensitive comparison"/><category term="Change Caption of Command Button using Word VBA"/><category term="ChartWizard in Excel VBA"/><category term="Chartwizard method in Excel VBA"/><category term="Compare Word Documents"/><category term="Connection String for Excel Database"/><category term="Convert document to PDF using VBA"/><category term="Copy matching data automatically through excel VBA"/><category term="Create New Module using VBA"/><category term="DateDiff Function Example"/><category term="Delete Comments using VBA"/><category term="Dialogsheets"/><category term="Document Styles using Word VBA"/><category term="Embed Existing Word File to Spreadsheet using Excel VBA"/><category term="Embed PDF Document in Excel/Word using VBA"/><category term="Error in Excel formula"/><category term="Excel Addins using VBA"/><category term="Excel VBA Applying Multiple Criteria in AutoFilter"/><category term="Excel VBA Autofilter"/><category term="Excel VBA Copy function"/><category term="Excel VBA PivotCache"/><category term="Excel VBA References property"/><category term="Excel VBA Transpose"/><category term="Excel VBA Uninstall Addins"/><category term="Excel VBA WorksheetFunction Transpose Function"/><category term="Excel VBA add OLEObject object"/><category term="Excel VBA copy text to Word document"/><category term="Excel as Database"/><category term="Excel to Word using VBA"/><category term="Extract First Row of the Filtered Range using Excel VBA"/><category term="FileSystemObject"/><category term="Formatting Report"/><category term="Formatting Text Files"/><category term="Get First Row of Excel AutoFilter using VBA"/><category term="How to copy text from Excel Range to Word bookmark"/><category term="Insert Procedure to a Module Using VBComponents"/><category term="Kill Statement"/><category term="Link Application Help with Program"/><category term="Login to Website using Excel VBA"/><category term="Mail Automation"/><category term="NetworkDays Worksheet Function"/><category term="No of occurrences using Find Method Excel VBA"/><category term="OnAction Property"/><category term="Programmaticaly search text in Google"/><category term="QueryDosDeviceW API Function"/><category term="Reading Text Files using VBA"/><category term="Retrieve TextBox Content from Powerpoint VBA"/><category term="Set Word Options using VBA"/><category term="SetAttr Function"/><category term="Shell Functions"/><category term="Show Dialog"/><category term="Uninstall Excel Addins using VBA"/><category term="Uninstall Word Templates (Addins / .DOT files) using VBA"/><category term="Use Autofilter in VBA"/><category term="Using Excel as Database"/><category term="Using Help"/><category term="VB6 Temporary Folder"/><category term="VBA AddOLEControl Method"/><category term="VBA Attach Module to Workbook"/><category term="VBA CommandBars"/><category term="VBA DateDiff"/><category term="VBA Dir Function"/><category term="VBA FileSystemObject"/><category term="VBA Find Method Example"/><category term="VBA NetworkDays"/><category term="VBA Shapes"/><category term="VBA Tips and Tricks"/><category term="VBA use Excel As Database"/><category term="Word VBA AddOLEControl"/><category term="Word VBA Bookmarks"/><category term="Word VBA Exists Method"/><category term="Word VBA Find Strings"/><category term="Word to PDF using VBA"/><category term="asynchronous Speak"/><category term="display the embedded document as an Icon using VBA"/><category term="1004 -- The file could not be accessed"/><category term="1004 Microsoft Office Excel cannot access the file"/><category term="ADO"/><category term="ADO Connection string for CSV File"/><category term="ADO Connection string for Text File"/><category term="ADO DataControl"/><category term="ADO Errors"/><category term="ADO Insert SQL Query"/><category term="ADO SQL Server 2005 Express"/><category term="ADO Text File Connection String"/><category term="ADO connection Events in VBA"/><category term="ADO control events using VBA"/><category term="ADO to update database"/><category term="ADODB in Excel"/><category term="ADOX Catalog"/><category term="Access 2007 Insert Data using VBA"/><category term="Accessi"/><category term="Action on message box responses"/><category term="ActiveWorkbook.Breaklink"/><category term="Add Argument Descriptions to Excel UDFs"/><category term="Add AutoCorrect  Entries for Excel using VBA"/><category term="Add AutoCorrect  Entries for Word using VBA"/><category term="Add Columns to Excel List Object using VBA"/><category term="Add Combo Box to the command Bar"/><category term="Add Combo Box using Word VBA"/><category term="Add Comments in Excel VBA"/><category term="Add Content Controls using VBA"/><category term="Add Controls Popup Menu using Powerpoint VBA. Add control to right-click menu using VBA"/><category term="Add Notes to PowerPoint"/><category term="Add Slides VBA"/><category term="Add Text Box to Slide"/><category term="Add TextBoxes to Sheet Programmatically using VBA"/><category term="Add ToolTipText in CommandBar"/><category term="Add Total Row to Excel Table using VBA"/><category term="Add Word Addins using VBA"/><category term="Add a new column to Excel Table using VBA"/><category term="Add a new menu item to the Tools menu"/><category term="Add command button to worksheet using VBA"/><category term="Adding Command Button to Popup"/><category term="Adding Controls using Powerpoint VBA"/><category term="Adding Default Chart to a Sheet using Excel VBA"/><category term="Adding Images to Header using Word VBA"/><category term="Adding Menu Items"/><category term="Adding Pictures to Header using Word VBA"/><category term="Adding to Popup menu"/><category term="Adding to Tools menu"/><category term="AllowEditRanges Excel VBA"/><category term="Alter Security settings in workbook through VBA"/><category term="Appending Text Files using VBA"/><category term="Application.GoTo"/><category term="Application.InputBox"/><category term="Application.Interactive in Excel VBA"/><category term="Application.IsTrusted in Outlook VBA"/><category term="Application.OnKey"/><category term="Application.SaveWorkspace VBA"/><category term="Application.Speech VBA"/><category term="Application.StatusBar"/><category term="Application.Wait as Sleep in VBA"/><category term="Array Filter"/><category term="Array Function in VBA"/><category term="Array of Objects in VBA"/><category term="Array.Sort function in Excel VBA. How to sort an Array in VBA. VBA Array Sort Function"/><category term="Arrays in AutoFilter Excel VBA"/><category term="Asp.Net Office Applications"/><category term="Assigning Keyboard shortcuts through VBA"/><category term="AutoCorrect feature using VBA"/><category term="AutoSize"/><category term="Automate Lotus Notes"/><category term="Automate Outlook"/><category term="Automate TextBox"/><category term="Automate Workbook Save"/><category term="Automatic to Manual Hyphens using Word VBA"/><category term="Automatically create Hyperlinks for all URLs in a document"/><category term="Automating Excel File Save"/><category term="Automating Excel from Asp.Net"/><category term="AutomationSecurity"/><category term="Autotagging Word VBA"/><category term="Autotagging using Word VBA"/><category term="Bind Keys using Word VBA"/><category term="BottomRightCell"/><category term="Browse Folder"/><category term="BuiltinDocumentProperties"/><category term="Calculate End date using VBA"/><category term="Calculate Last Day of the Month"/><category term="Calculate the End Date using Formula / VBA"/><category term="Calculation"/><category term="Call Method in Addin from Visual Basic Applications"/><category term="Case sensitive comparison"/><category term="Categorize Excel UDFs"/><category term="Change Text in Textboxes using word VBA"/><category term="Changing File Attributes"/><category term="Characters object"/><category term="Chart to Image Conversion using VBA"/><category term="Check Application Instances"/><category term="Check Date Range"/><category term="Check Directory Existence"/><category term="Check Existence of Book mark"/><category term="Check Folder Existence VBA"/><category term="Check Presence of AutoFilter in a Sheet PRogramatically"/><category term="Check Presence of AutoFilter in a Sheet using VBA"/><category term="Check Word Instance VBA"/><category term="Check broken reference using VBA"/><category term="Check if Code is Trusted Outlook VBA"/><category term="Check if Date within Range"/><category term="Check if Instance of Application is Running"/><category term="Check if Range is Filtered using VBA"/><category term="Check if Value exists Excel VBA"/><category term="Check if a workbook is Saved using Excel VBA"/><category term="Check if the Workbook is Read-Only"/><category term="Check state of protection of VBProject"/><category term="Check valid reference in the registry usingf VBa"/><category term="Choose Function"/><category term="Choose the Values"/><category term="Clear Excel Status Bar  using VBA"/><category term="Clone Document in Word VBA"/><category term="Code Validate Date"/><category term="Collection of objects using Excel VBA"/><category term="Command Bars in Excel"/><category term="CommandBars in Powerpoint using VBA"/><category term="Comments.Add in Excel VBA"/><category term="Common Dialog Example VB"/><category term="CommonDialog VBA"/><category term="Compact MS Access Database using ADO"/><category term="Compact MS Access Database using VBA (ADO Code)"/><category term="Compare Files by Date"/><category term="Compare Formatting Changes in Word Document using VBA"/><category term="Compare Headers and Footers in Word Document using VBA"/><category term="Compress Pictures/Images in Excel using VBA"/><category term="Computer Name VB Function"/><category term="Connect to Website from Excel VBA"/><category term="Connection String CSV File ADO"/><category term="Content Controls in VBA"/><category term="ContentControls in Word VBA"/><category term="Control Excel from Powerpoint using VBA"/><category term="Convert Comments to Range Text using VBA"/><category term="Convert Decimal to Percent using VBA"/><category term="Convert Decimal to Percentage using VBA"/><category term="Convert Drive Name to Sharename using VBA"/><category term="Convert Format to Tags using Word VBA"/><category term="Convert Text to Array in Excel VBA"/><category term="Convert Text to Hyperlinks using VBA"/><category term="Convert Used Range to an Excel Table using VBA"/><category term="Convert Webaddress or email as Hyperlinks"/><category term="Convert Word Symbols to Entities using Visual Basic"/><category term="Copy Array to Excel Range usiong VSTO"/><category term="Copy Comments to Range using Excel VBA"/><category term="Copy Files using VBA"/><category term="Copy specific data automatically"/><category term="Copying Files VBA"/><category term="Copying Folders VBA"/><category term="Copying folders in VBA using File System Object"/><category term="Could not find installable ISAM"/><category term="Create Access database using VBA"/><category term="Create Database using ADO"/><category term="Create Excel VBA ListObjects"/><category term="Create Folder VBA"/><category term="Create Menu using VBA"/><category term="Create New Command Bar"/><category term="Create Pivot Table using Excel VBA"/><category term="Create ReadOnly Files"/><category term="Create Slides using VBA"/><category term="Create a Pivot Table from Existing Pivot Cache"/><category term="Creating Digital Signature for VBA Project"/><category term="Creating Excel Pie Chart using Excel VBA"/><category term="Creating Excel TrendLine Chart using Excel VBA"/><category term="Creating Log Files"/><category term="Creating Microsoft Access database on the fly using VBA"/><category term="Creating Presentation using VBA"/><category term="Creating a Command Button on Sheet using Excel VBA"/><category term="Creating an Excel Add-in"/><category term="Customizing VBA Project  properties"/><category term="Customizing VBA editor using VBA"/><category term="DDE or OLE Automation in Excel VBA"/><category term="Dates as array in VBA"/><category term="Decrease Shapes"/><category term="Delete Command Bar"/><category term="Delete Control From CommandBar"/><category term="Delete Empty Rows in Excel"/><category term="Delete Entire Row"/><category term="Delete Images from Spreadsheets"/><category term="Delete Module using VBA"/><category term="Delete Temporary Files"/><category term="Delete Temporary Files VBA"/><category term="Delete Word Addins using VBA"/><category term="Delete Word Backup files using Word VBA"/><category term="Delete Word Temp Files VBA"/><category term="Delete the entire folder using VBA"/><category term="Delete unwanted Word Templates (Addins / .DOT files) using VBA"/><category term="DeleteMenu WinAPI Function"/><category term="Deletion of Images"/><category term="Developer tab on Ribbon (Excel)"/><category term="Device Name"/><category term="Dir Function in VBA"/><category term="Dir$ Function Example"/><category term="Disable AutoRecovery using Word VBA"/><category term="Disable Close Button"/><category term="Disable Close Button using VBA"/><category term="Disable Cut and Copy from Popup menu"/><category term="Disable Developer Tab in Office 2010"/><category term="Disable Macros using VBA"/><category term="Disable Maximize button using VBA"/><category term="Disable Popup Menu Items"/><category term="Disable Right Click Menu"/><category term="Disable command bars and controls"/><category term="Disabling Excel events"/><category term="Disallow user interaction - Excel VBA"/><category term="Display ToolTipText in CommandBar Controls"/><category term="Display Unique Rows using Advanced Filter Excel VBA"/><category term="DocProperty Field in Word VBA"/><category term="Document Comments using VBA"/><category term="Document Conversion"/><category term="Document Creation Time in VBA"/><category term="Document Parts in Word VBA"/><category term="Download Code  Latest File"/><category term="Download Code File Size"/><category term="Download Code Image Range"/><category term="Download Office 2010"/><category term="Dynamic Addition of command to tools menu. Adding Command Button to Tools"/><category term="Dynamic Creation of Function / Procedure in BAS/Class Module"/><category term="Dynamic Time"/><category term="Dynamically Create New User Form using VBA"/><category term="Dynamically Draw Rectangle in UserForm"/><category term="EDATE WorksheetFunction"/><category term="EXCEl VBA AddIns"/><category term="EXcel VBA AddFromString"/><category term="EXcel VBA Check  Procedure Existence. Count the No of MAcros in a Workbook"/><category term="EXcel VBA LinkSources"/><category term="EXcel VBA Protect Sheet"/><category term="EXcel VBA Protection of VB Project"/><category term="EXcel VBA Sheet Protection"/><category term="EXcel VBA Userform Draw Rectangle"/><category term="Early Binding"/><category term="Edit Embedded Objects using Word VBA"/><category term="Edit Linked Objects in VBA"/><category term="Email Domain Separation"/><category term="Embed Word Document to Excel Sheet using Excel VBA"/><category term="Enable AutoRecovery using Word VBA"/><category term="Enable or Disable dragging and dropping cells in Excel"/><category term="EnableMenuItem WinAPI Function VB EXample"/><category term="EndOfDoc Bookm arks Word VBA"/><category term="EoMonth Worksheet Function"/><category term="Evaluate Method"/><category term="Events in VBA"/><category term="Excel 2003 Delete Comments"/><category term="Excel 2010"/><category term="Excel ADO"/><category term="Excel Cell Orientation"/><category term="Excel Cell Rotation"/><category term="Excel Chart to GIF Conversion using VBA"/><category term="Excel CommandBarControl VBA"/><category term="Excel Database ADO"/><category term="Excel Delete Rows"/><category term="Excel Events Disable"/><category term="Excel Format Images"/><category term="Excel Formula recalculation"/><category term="Excel Height of Row"/><category term="Excel Macros Speedup"/><category term="Excel Modeless Userform in VBA"/><category term="Excel Print Multiple Sheets"/><category term="Excel Range to JPG using VBa"/><category term="Excel Shapes"/><category term="Excel Sheet Comments to Range"/><category term="Excel Tables and its advantages"/><category term="Excel VBA  PivotTable"/><category term="Excel VBA -  keywords"/><category term="Excel VBA 1004 -- The file could not be accessed"/><category term="Excel VBA ADO for Text Files"/><category term="Excel VBA AddFromFile"/><category term="Excel VBA Advanced Filter"/><category term="Excel VBA Application.CellDragAndDrop"/><category term="Excel VBA Application.GoTo"/><category term="Excel VBA Autofilter- Only Last Value of the Array"/><category term="Excel VBA BuiltIn property"/><category term="Excel VBA CodeModule"/><category term="Excel VBA Combo Boxes"/><category term="Excel VBA Conditional Formatting"/><category term="Excel VBA Convert Dates into Arrays"/><category term="Excel VBA Create Pivot Table using Wizard"/><category term="Excel VBA Custom Properties Extraction"/><category term="Excel VBA DataBodyRange"/><category term="Excel VBA Delete Duplicate Rows"/><category term="Excel VBA Detect Duplicate Values"/><category term="Excel VBA Dropdowns"/><category term="Excel VBA FileSearch property"/><category term="Excel VBA Find Matches Array"/><category term="Excel VBA HasFormula"/><category term="Excel VBA InputBox"/><category term="Excel VBA IsDirty Function"/><category term="Excel VBA ListColumn"/><category term="Excel VBA Mail"/><category term="Excel VBA NewSearch method"/><category term="Excel VBA NumberFormat"/><category term="Excel VBA OleObjects"/><category term="Excel VBA Path property"/><category term="Excel VBA Pivot Tables"/><category term="Excel VBA Remove Duplicate Rows"/><category term="Excel VBA Replace Function"/><category term="Excel VBA Right Click Menu item creation"/><category term="Excel VBA Saved property"/><category term="Excel VBA Scroll to a Range"/><category term="Excel VBA Select named range"/><category term="Excel VBA Shortcuts"/><category term="Excel VBA Show Unique Rows"/><category term="Excel VBA ShowTotals Method"/><category term="Excel VBA SpecialCells Excel cell that contains formula couple"/><category term="Excel VBA SpecialCells Numerals"/><category term="Excel VBA SpecialCells Numerals in Formula Results"/><category term="Excel VBA Tag Bold Text"/><category term="Excel VBA Tag Color Text"/><category term="Excel VBA Tag Italic Text"/><category term="Excel VBA Tag Underlined Text"/><category term="Excel VBA Timer"/><category term="Excel VBA VBComponents"/><category term="Excel VBA WebOptions"/><category term="Excel VBA add  ActiveX control"/><category term="Excel VBA add Code Modules"/><category term="Excel VBA breaking links"/><category term="Excel VBA check VBE mode"/><category term="Excel VBA format characters within a text string"/><category term="Excel VBA undo changes"/><category term="Excel WorkDay Function"/><category term="Excel as database for Query Table"/><category term="Excel formula calculation error"/><category term="Excel-Outlook"/><category term="Excl macro copy matching rows"/><category term="Exclude Holidays in Networking days"/><category term="Execute Macro in All Files"/><category term="Execute Visual Basic Program from Command Line"/><category term="Execute Word Macro on File Open"/><category term="Executing Excel VBA procedures"/><category term="Expand Ranges using Word VBA"/><category term="Exploded Pie Chart using Excel VBA"/><category term="Export Excel Chart to Image using VBA"/><category term="Export Powerpoint Slide to Image using VBA"/><category term="Export RichTextBox content as RTF file using VBA"/><category term="Export Word Range as RTF using VBA"/><category term="ExportFragment in Word VBA"/><category term="External table is not in the expected format - Excel ADO VBA"/><category term="Extract  external links using VBA"/><category term="Extract Bold Range using Excel VBA"/><category term="Extract Cells Containing Numbers alone using Excel VBA"/><category term="Extract Character Styles Word VBA"/><category term="Extract Color Range using Excel VBA"/><category term="Extract Excel Properties"/><category term="Extract File Names using VBA"/><category term="Extract Formula using VBA"/><category term="Extract Italic Range using Excel VBA"/><category term="Extract Keywords"/><category term="Extract Macro Names from Workbook"/><category term="Extract Paragraph Styles Word VBA"/><category term="Extract Powerpoint Slides"/><category term="Extract References of a VBA Project"/><category term="Extract TextBoxes using VBA"/><category term="Extract Underlined Range using Excel VBA"/><category term="Extract all Linked Objects in Excel Spreadsheet using VBA"/><category term="File Handling Functions"/><category term="File Modification Time"/><category term="File Size"/><category term="File Size - VBA Function"/><category term="File not closed error in VBA"/><category term="FileCopy  Example"/><category term="FileLen"/><category term="FileSystemObject Copyfolder"/><category term="FileSystemObject GetDrive"/><category term="FileSystemObject GetDriveName"/><category term="FileSystemObject folderexists"/><category term="FileSystemObject&#39;s ShareName"/><category term="Fill Spaces VBA"/><category term="Filter Array Content"/><category term="Filter Webpages using VBA"/><category term="Filtering Range using Excel VBA"/><category term="Find End Of Document using Word VBA"/><category term="Find Image Range - Excel"/><category term="Find the Latest File"/><category term="Find the no of Working days in a year using VBA"/><category term="FindAll Function in Excel VBA"/><category term="Flip Images"/><category term="Format Excel Cells using VBA"/><category term="Format Excel Columns using VBA"/><category term="Format RichText Content Control using Word VBA"/><category term="Format Shapes"/><category term="Formatting Cells Programmatically using VBA"/><category term="Function keys as Shortcut Keys in VB"/><category term="Function to Fill Characters VB"/><category term="Get Domain Name"/><category term="Get File Attributes - GetAttr"/><category term="Get File Name using VBA"/><category term="Get OS Version using VBA"/><category term="Get Path of Linked Objects using Word VBA"/><category term="Get Running Processes"/><category term="Get Sub Directories using  VBA Dir Function"/><category term="Get Sub Directories using  VBA FileSystemObject Function"/><category term="Get Temp Folder"/><category term="Get Temporary Folder"/><category term="Get The Devic eName using VBA"/><category term="Get The Name of Drive using VBA"/><category term="Get Variable Type"/><category term="Get the LOGON SERVER"/><category term="Get the Shared Name of a drive"/><category term="Get the Title property"/><category term="GetAttr Function"/><category term="GetExitCodeProcess API Function"/><category term="GetOpenFilename Method"/><category term="GetSaveAsFilename Method"/><category term="GetSystemMenu  Win API Function"/><category term="GetSystemMetrics"/><category term="GetTempPath"/><category term="GetVersionEx  VBA"/><category term="Getobject Internet Explorer in VBA"/><category term="HTML Help"/><category term="Height of Row using Excel VBA"/><category term="Hide / Unhide Sheet Tab using Excel VBA"/><category term="Hide / Unhide Worksheets using Excel VBA (Excel 2007)"/><category term="Hide All Comments in Excel VBA"/><category term="Hide Excel Status Bar"/><category term="Highlight Editable ranges using VBA"/><category term="How to Check Internet Connection using VBA"/><category term="How to Check Internet Connectivity using VBA"/><category term="How to Configure Source Data of Pivot Table using VBA"/><category term="How to Increase / Decrease Size of Pictures in Word Document using VBA"/><category term="How to Load Analysis ToolPak in Excel 2007"/><category term="How to Make a file ReadOnly"/><category term="How to add format condition using Excel VBA"/><category term="How to add macro to workbook using VBA"/><category term="How to call a VSTO Addin Function from VBA"/><category term="How to check if Pivot Table is external"/><category term="How to clean Office Solution from Visual Studio"/><category term="How to create an event in VBA"/><category term="How to create event procedures in VBA for ADO connection"/><category term="How to determine the source of Pivot Table using VBA"/><category term="How to digitally sign a VBA Project"/><category term="How to disable keys using VBA"/><category term="How to enable Additional Controls in Tools menu - VBA"/><category term="How to get Free Disk Space using VBA"/><category term="How to get embedded Word object"/><category term="How to get milliseconds in VBA Now() function"/><category term="How to ignore AutoNumber field in VBA ADO"/><category term="How to insert data to Access 2007 database  using VBA"/><category term="How to insert value in a range using VSTO"/><category term="How to make VB Application a Single Instance one"/><category term="How to make VB Exe as a Single Instance one"/><category term="How to make single instance VB Application"/><category term="How to prevent Content controls being deleted"/><category term="How to retrieve free space available using VBA"/><category term="How to search embedded Excel using Word VBA"/><category term="How to stream a text file to speaker using VBA"/><category term="How to undo an action using Excel VBA"/><category term="How to unistall Excel/Word addins using Visual Studio"/><category term="How to use collections in Excel VBA"/><category term="Hyperlinks in Excel VBA"/><category term="Identify Browser Version using Excel VBA"/><category term="Identify End of Document using Word VBA"/><category term="Identify Error Cells in a Sheet using Excel VBA"/><category term="Identify Objects that are linked to Source file using Excel VBA"/><category term="Identify Out of Office using Outlook VBA"/><category term="Identify Raneg of the Image/Shape"/><category term="Identify Range Containing Formula using Excel VBA"/><category term="Identify Underlined text throughout the document using Word VBA"/><category term="Identify the last-modified or latest file using Excel VBA"/><category term="Ignore Weekends"/><category term="Import RTF file to Activedocument"/><category term="InStr Function"/><category term="InStrRev Function in VBA"/><category term="Increase Speed of Macros"/><category term="Increase Speed of VBA"/><category term="InputBox method"/><category term="Insert Macro to a Module Using VBComponents"/><category term="Insert Values for Multiple Cells using Excel VSTO"/><category term="Insert data through SQL to Accdb"/><category term="Install Analysis ToolPak in Excel 2007"/><category term="Install Word Addins using VBA"/><category term="Install Word Templates (Addins / .DOT files) using VBA"/><category term="IsError Function"/><category term="IsMissing Doesn&#39;t Work"/><category term="IsMissing Function"/><category term="Keywords properties"/><category term="Kill Excel Process"/><category term="Kill Task using VBA"/><category term="Kill Word Process"/><category term="Launch PRogram from command"/><category term="Limit Text Box Length"/><category term="LinkedTextBoxes in VBA"/><category term="Linking Text Box to Excel Range using VBA"/><category term="ListColumns in Excel VBA"/><category term="ListFormat in Word VBA"/><category term="ListObjects in Excel VBA"/><category term="Listobjects DataBodyRange using VBA"/><category term="Lock and Unlock cells using VBA"/><category term="LockWorkStation VBS"/><category term="Loop thru Folders"/><category term="Lotus Notes Mail Automation"/><category term="Lotus Notes VBA"/><category term="Lset"/><category term="MAPI Namespace in Outlook VBA"/><category term="MAcro for Creating PivotTable"/><category term="MSFlexGrid"/><category term="MSHFlexGrid"/><category term="Macro to Update File Properties"/><category term="Macro to extract editable ranges"/><category term="Make the file Hidden"/><category term="Make the file Read-Only"/><category term="Manipulating Excel Ranges using VBA"/><category term="Mark Selected Text as an Index Entry (Word VBA)"/><category term="Match Excel Column a Range"/><category term="MaxLength  Property"/><category term="Maximum Characters In a cell in Excel 2007/2010"/><category term="Maximum No of Rows in Excel 2007"/><category term="Menu"/><category term="Merging Files using VBA"/><category term="Microsoft HTML Object Library in VBA"/><category term="Microsoft Internet Controls - VBA Reference"/><category term="Microsoft Internet Controls VBA"/><category term="Microsoft Jet and Replication objects"/><category term="Microsoft Outlook Mail Automation"/><category term="Microsoft Scripting Runtime"/><category term="Millisecond timer using VBA"/><category term="Minor and Major Operating System versions using VBA"/><category term="Modeless Userform in VBA"/><category term="Modifying File Atrributes"/><category term="Move Batch Files using VBA"/><category term="MoveFile  Example"/><category term="Moving Log Files"/><category term="Multiline TextBox"/><category term="Multiple Return Parameters in VBA"/><category term="Multiple Return Parameters in Visual Basic"/><category term="Name Statement"/><category term="Neatly Spaced Text File"/><category term="No of Worksheets using Excel VBA"/><category term="No of days in a month using Excel VBA"/><category term="No of processors using VBA"/><category term="Object required 424 error"/><category term="Office 2007 show developer tab"/><category term="Office 2010"/><category term="Open Downloaded Web Pages in Word/Excel using VBA"/><category term="Open Specific Folder using Visual Basic"/><category term="Open Text File using ADO"/><category term="Open XML File in Excel"/><category term="Open and Repair Excel Workbook using VBA"/><category term="OpenProcess  API Function"/><category term="Opening File using Common Dialog"/><category term="Openworkspace Excel VBA"/><category term="Operating System using VBA"/><category term="Optimize VBA Code"/><category term="Option Compare Text. VBA Case Insensitive Cpmparison"/><category term="Optional Parameters"/><category term="Orientation of CElls"/><category term="Outlook VBA ExchangeStoreType"/><category term="Outlook VBA Explorers collection"/><category term="Outlook VBA Extract Body content of Mails"/><category term="Outlook VBA Extract Subject of Mails"/><category term="Outlook VBA GetDefaultFolder  MEthod"/><category term="Outlook VBA GetNameSpace method"/><category term="Outlook VBA GetTable MEthod"/><category term="Outlook VBA IsTrusted"/><category term="Outlook VBA Mailitem"/><category term="Outlook VBA PropertyAccessor"/><category term="Outlook VBA StorageItem object"/><category term="Outlook VBA Store Hidden Data"/><category term="Outlook VBA Subject property"/><category term="Outlook VBA Templates"/><category term="PPT to PDF using VBA"/><category term="Paste Formatted Text from Word to Outlook using VBA"/><category term="Permanently hide worksheet from user using VBA"/><category term="Pick the Value from the array"/><category term="Pivot Table from New Pivot Cache using Excel VBA"/><category term="Pivot Tables and VBA"/><category term="PivotTableWizard method in Excel VBA"/><category term="Play Audio File using Excel VBA"/><category term="PlaySound API Function"/><category term="Populate Userform with Excel Range using VBA"/><category term="Popup Menu"/><category term="Powerpoint VBA CommandBarPopup"/><category term="Powerpoint VBA Delete End Points"/><category term="Powerpoint VBA SaveAs Argument Password Option"/><category term="Ppwerpoint to image conversion using VBA"/><category term="Print Multiple Ranges"/><category term="Print Multiple Sheets using VBA"/><category term="Program Word Document in Excel Sheet"/><category term="Programatically Format part of Text"/><category term="Programmatically Identify cells containing Formula"/><category term="Programmatically add macros to workbook"/><category term="Programmatically update Database tables"/><category term="Programming OLEOBjects in VBA to embed Word Document"/><category term="Programming Word TextBoxes using VBA"/><category term="Protect Sheet using VBA"/><category term="Query Excel Data effectively"/><category term="Query Table with Excel as Data Source"/><category term="Query Table with Text File as Data Source"/><category term="QueryTable object in Excel VBA"/><category term="RTF to PDF using VBA"/><category term="Read Text files using FileSystemObject"/><category term="Read files using VBA Read Configuration Files using VBA"/><category term="Rebind keys using VBA"/><category term="Reducing Size of Microsoft Access Database"/><category term="RefreshTable VBA"/><category term="Remove Autofilter using VBA"/><category term="Remove Comments using VBA"/><category term="Remove End Punctutations from List Items using VBA"/><category term="Remove Images"/><category term="RemoveDocumentInformation Excel 2007 VBA"/><category term="RemoveMenu  Win API Function"/><category term="RemovePeriods Method Powerpoint VBA"/><category term="Repair Workbook using VBA"/><category term="Replace Contents in Excel automatically"/><category term="Replace Function in VBA Example"/><category term="Replace Values of a Column"/><category term="Resizing Text Boxes"/><category term="Retrieve images of the Word document using VBA / Extract images in Word document into separate files using VBA"/><category term="Return Multiple Values – VBA Function"/><category term="Right Click Menu"/><category term="Rotate Images"/><category term="Route message to speaker in VBA"/><category term="RowHeight using Excel VBA"/><category term="Rset"/><category term="Rtf to Word"/><category term="Run Macro on Image Click"/><category term="Run a Macro from Different Workbook"/><category term="Run a Macro in a Different Workbook"/><category term="Run a Macro with arguments from Different Workbook"/><category term="Run-time Error 55 File already open"/><category term="Run-time Errror 445 Object doesn&#39;t support this action in Application.FileSearch"/><category term="Run-time error &#39;1004&#39;: Add method of addins class failed"/><category term="Run-time error &#39;1004&#39;: Unable to get the Add property of the AddIns class"/><category term="Running Extrernal Application used VBA"/><category term="SHFileOperation WinAPI Function"/><category term="SQL Server 2005 Express Connection through VBA"/><category term="SQL Server 2005 Express VBA"/><category term="Save All Open Workbooks using VBA"/><category term="Save As dialog box"/><category term="Save Chart as Jpeg files using VBA"/><category term="Save Excel Selection as Image using VBA. How to export Excel Range as Image"/><category term="Save Selected Range as RTF using VBA"/><category term="SaveAs Option with Password in Powerpoint VBA"/><category term="SaveCopyAs"/><category term="Saves a copy of the workbook"/><category term="Scaling of Pictures / Images using VBA"/><category term="Scaling of Pictures / Images using Word VBA"/><category term="ScreenUpdating"/><category term="Scroll Window using Excel VBA"/><category term="Search Text in Google using Excel VBA"/><category term="Search Webpages using VBA"/><category term="Select Webpage using VBA"/><category term="Select a Named Range using Excel VBA"/><category term="Select value from Array"/><category term="SelfCert.EXe"/><category term="Send Mail from Lotus Notes"/><category term="Send Mail from Outlook"/><category term="Send Multiple eMail"/><category term="SendKeys"/><category term="Server-side automation"/><category term="Set Auto Recovery Duration using VBA"/><category term="Set Chart Title programatticaly using Excel VBA"/><category term="Set Chart postion programatticaly using Excel VBA"/><category term="Set Default no of Worksheets using Excel VBA"/><category term="Set frequency of Autorecovery Save using VBA"/><category term="Set the Project Name of VBA project programmatically"/><category term="Setting Tool tip through Code"/><category term="Shape Attributes through Word VBA"/><category term="Share Name"/><category term="Shared Name For the Drive"/><category term="Shortcut for MArking indexes using VBA"/><category term="Show All Comments in Excel VBA"/><category term="Show Excel Status Bar"/><category term="Show Open Dialog Box"/><category term="Show Pivot Table Field List"/><category term="Show Print Setup Dialog using VBA"/><category term="Show Revisions using Word VBA"/><category term="Show all running processes using WinAPI"/><category term="ShowPivotTableFieldList Property in Excel VBA"/><category term="ShutDown Windows using VBA"/><category term="Sleep Function in Excel VBA"/><category term="Sort Files By Date using Excel VBA"/><category term="Sort Table Columns using Word VBA"/><category term="Sort Text in Word Table using Word VBA"/><category term="Special Folders"/><category term="Speech to Text using VBA"/><category term="Speedup Excel Macros"/><category term="Speedup VBA Performance"/><category term="Switch off Track Revisions using Word VBA"/><category term="TASKKILL function in VBA"/><category term="Tables to PDF using VBA"/><category term="Tag List Items in Word VBA"/><category term="Temporary Folder Visual Basic Code"/><category term="TemporaryFolder"/><category term="Terminate Excel Process using VBA"/><category term="Terminate Word Process using VBA"/><category term="Text Box vbCRLf"/><category term="Text Files as Datasource"/><category term="TextBox Drag and Drop"/><category term="Time Function"/><category term="Timer Control"/><category term="TopLeftCell"/><category term="Track Revisions using VBA"/><category term="Transposign an Array"/><category term="Turn the Image Upside Down"/><category term="USER DOMAIN using VBA"/><category term="Undo changes programmatically using VBA"/><category term="Unhide Columns using Excel VBA"/><category term="Unhide Rows using VBA"/><category term="Unprotect Sheet using VBA"/><category term="Update Access 2007 table using ADO"/><category term="Update Access 2007 table using VBA"/><category term="Update Access AutoNumber Field using VBA"/><category term="Update Tool Tip Text in Run time"/><category term="Update all Field Codes in Word Document"/><category term="Update non-contiguous ranges using VBA"/><category term="Use Image Click to Execute Macro"/><category term="Use Images as Command Buttons"/><category term="Use VB Application in VBA"/><category term="Use Visual Basic .NET or C# Functions in VBA"/><category term="Userdefined Function in Excel VBA"/><category term="Userform Draw Rectangle"/><category term="Using Excel Functions in VBA"/><category term="VB File Exists"/><category term="VB Forms Function keys"/><category term="VB Function Get Temp Folder"/><category term="VB GetAttr Function"/><category term="VB6 GetObject"/><category term="VBA"/><category term="VBA  Move File"/><category term="VBA ASC Function"/><category term="VBA Application.Filesearch"/><category term="VBA Application.Filesearch Error"/><category term="VBA Arrays"/><category term="VBA Attach Module"/><category term="VBA Change Pivot Table source data externally"/><category term="VBA Check File Availability"/><category term="VBA Choose Function"/><category term="VBA Code to transfer the array contents to Excel"/><category term="VBA Collections"/><category term="VBA Command Bars"/><category term="VBA CommandBarControl"/><category term="VBA Comments"/><category term="VBA CommonDialog Filters"/><category term="VBA Compare Documents"/><category term="VBA Compare Files by Date"/><category term="VBA Computer Name"/><category term="VBA Confirm Internet Connection"/><category term="VBA Controls.Add"/><category term="VBA Convert Ranges to Text"/><category term="VBA Copyfolder"/><category term="VBA Create Database"/><category term="VBA Create Menu"/><category term="VBA Create Popup menu"/><category term="VBA Creation date"/><category term="VBA Customize Command Bar"/><category term="VBA Decimal to Hexadecimal Conversion"/><category term="VBA Decimal to Octal Conversion"/><category term="VBA Decimal to percent"/><category term="VBA Delete Files"/><category term="VBA Delete Folder"/><category term="VBA Delete Images"/><category term="VBA Delete Module"/><category term="VBA Detach Module to Workbook"/><category term="VBA Disable shortcuts"/><category term="VBA Disabling Close Button"/><category term="VBA Drag and DRop Files to Text Box"/><category term="VBA Email"/><category term="VBA EntireRow Property"/><category term="VBA Event procedures"/><category term="VBA Excel Comment Automation"/><category term="VBA Excel ListBox Populate"/><category term="VBA Extract Excel Comments using VBA"/><category term="VBA Extract Keywords"/><category term="VBA Extract Properties"/><category term="VBA FileLen Function"/><category term="VBA Filler Function"/><category term="VBA Filter Function"/><category term="VBA Filtering Array Content"/><category term="VBA Find All Method Example"/><category term="VBA Format Cells"/><category term="VBA Format Images"/><category term="VBA FreeFile"/><category term="VBA Function to Logoff"/><category term="VBA Function to Restart Windows"/><category term="VBA Function to return more than one value"/><category term="VBA Get ASCII Value of an Character"/><category term="VBA Get Active Internet Explorer"/><category term="VBA Get System Processes"/><category term="VBA Get User Name"/><category term="VBA GetObject"/><category term="VBA GetOpenFilename Method"/><category term="VBA HideFieldCodes"/><category term="VBA Host Name"/><category term="VBA Input # Statement Example"/><category term="VBA Input Function Example"/><category term="VBA Insert  Degrees Symbol"/><category term="VBA Insert  Multiplication Sign Symbol"/><category term="VBA Insert  Plus Minus Symbol"/><category term="VBA Insert  Yen Sign"/><category term="VBA Insert SQL Query"/><category term="VBA Last save time"/><category term="VBA Latest File"/><category term="VBA Link Macro to CommandBar"/><category term="VBA Lock Computer"/><category term="VBA Mail automation"/><category term="VBA Milliseconds"/><category term="VBA Modify Non-continuous ranges"/><category term="VBA Msgbox"/><category term="VBA Now() function"/><category term="VBA Number of pages"/><category term="VBA OnTime Method"/><category term="VBA Open Windows Explorer"/><category term="VBA Open and Repair Workbook"/><category term="VBA Opening Text Files"/><category term="VBA Pivot Table source"/><category term="VBA Position of Images"/><category term="VBA Read Text Files"/><category term="VBA RmDir  Method"/><category term="VBA Save Chart as Images"/><category term="VBA Save Workbook"/><category term="VBA Saving Powerpoint"/><category term="VBA Select a Folder"/><category term="VBA Send File to Recycle Bin"/><category term="VBA Show processes in Task Manager"/><category term="VBA ShowFieldCodes"/><category term="VBA Speaker output"/><category term="VBA System Resolution"/><category term="VBA Tag Macro to an Image"/><category term="VBA Temporary Folder"/><category term="VBA Temporary Folder Path"/><category term="VBA ThisWorkbook.VBProject"/><category term="VBA Timer function"/><category term="VBA Tool Tip Text"/><category term="VBA TotalsRowRange"/><category term="VBA Update File Properties"/><category term="VBA WeekdayName Function"/><category term="VBA Windows Folder Path"/><category term="VBA XCOPY Function"/><category term="VBA alter Automation Security"/><category term="VBA and ADO"/><category term="VBA code to No of Working days in a Year"/><category term="VBA code to find underlined text"/><category term="VBA identify if program is in debug mode"/><category term="VBA recursive deep directory search"/><category term="VBA scheduling functions"/><category term="VBA scheduling procedure"/><category term="VBA shortcut assignment"/><category term="VBA sleep function"/><category term="VBA to Select Multiple Sheets"/><category term="VBA to create database on the fly"/><category term="VBA to edit embedded Excel sheet"/><category term="VBS Convert to Percent"/><category term="VBScript  Lock Computer"/><category term="VSTO"/><category term="VSTO Addin Functions in VBA"/><category term="VSTO Addins"/><category term="VSTO Array to Range"/><category term="VSTO Excel Autofit Columns"/><category term="Validate Date"/><category term="Validate Date between Ranges"/><category term="Validate User Value for Comboboxes in Word VBA"/><category term="Validate and revert changes to an Excel Range using VBA"/><category term="VarType"/><category term="Visual BAsic Filler Function"/><category term="Visual Basic"/><category term="Visual Basic ASC functiion"/><category term="Visual Basic Array Filters"/><category term="Visual Basic Choose Function"/><category term="Visual Basic Code Optimization"/><category term="Visual Basic Command Line Arguments"/><category term="Visual Basic CommonDialog"/><category term="Visual Basic Dir Function"/><category term="Visual Basic Drag and DRop Files to Text Box"/><category term="Visual Basic Forms Keypreview  property"/><category term="Visual Basic Get Computer Name"/><category term="Visual Basic Get File Size"/><category term="Visual Basic Get Screen Area"/><category term="Visual Basic Get Screen Height"/><category term="Visual Basic Get Screen Width"/><category term="Visual Basic GetObject"/><category term="Visual Basic Keydown event"/><category term="Visual Basic Open a Folder in Windows Explorer How to Open Explorer Window using VBA"/><category term="Visual Basic Preserve keyword"/><category term="Visual Basic ReDim statement"/><category term="Visual Basic ToolTipText"/><category term="Visual Basic array dimension"/><category term="Wait method in VBA"/><category term="WeekDay Excel VBA"/><category term="Wild Cards in VBA"/><category term="Windows API  Process32First"/><category term="Windows API Get Screen Area"/><category term="Windows API Get Screen Height"/><category term="Windows API Get Screen Width"/><category term="Windows Directory using VBA"/><category term="Word 2010"/><category term="Word Check Compatibility"/><category term="Word Field Codes"/><category term="Word Modeless Userform in VBA"/><category term="Word Table Sort using VBA"/><category term="Word VBA 5101 - This bookmark does not exist error"/><category term="Word VBA AutoFormatReplaceHyperlinks  Automatically Format Hyperlinks"/><category term="Word VBA Check if Cursor is within Table"/><category term="Word VBA Check if Selection is within Table"/><category term="Word VBA Comments"/><category term="Word VBA Convert Symbols to Entities"/><category term="Word VBA Expand Ranges"/><category term="Word VBA Export Range to New Document"/><category term="Word VBA FreeDiskSpace property"/><category term="Word VBA Get Author Names"/><category term="Word VBA Hide Field Codes"/><category term="Word VBA Highlight Strings"/><category term="Word VBA Highlight Text"/><category term="Word VBA HorizontalResolution"/><category term="Word VBA How to prevent spelling errors in Word Document"/><category term="Word VBA Hyphenation"/><category term="Word VBA Insert Fields"/><category term="Word VBA Insert Symbols"/><category term="Word VBA Mark Index"/><category term="Word VBA MeaningList"/><category term="Word VBA Print Setup Dialog"/><category term="Word VBA Run method"/><category term="Word VBA RunAutoMacro method"/><category term="Word VBA Selection.Information"/><category term="Word VBA Set / Reset TrackRevisons"/><category term="Word VBA Show Field Codes"/><category term="Word VBA SynonymInfo"/><category term="Word VBA Synonyms"/><category term="Word VBA There are too many spelling or grammatical errors dialog"/><category term="Word VBA VerticalResolution"/><category term="Word VBA avoid Spell check dialog"/><category term="Word VBA convert character codes to Unicode character"/><category term="Word VBA convert to PDF"/><category term="Word VBA for InlineShapes"/><category term="Word VBA get Height of Figures"/><category term="Word VBA get Track Revision Details"/><category term="Word document - get figure width using Word VBA"/><category term="Word insert Properties using Field Codes"/><category term="WorksheetFunction.EoMonth"/><category term="Write Configuration Files using VBA"/><category term="Write INI files using VBA"/><category term="Write to Text File"/><category term="XML and VBA"/><category term="XML in Excel"/><category term="asynchronous voice messages using VBA"/><category term="break the links to external source"/><category term="check visibility of VBE code window using VBA"/><category term="disable popup menu"/><category term="disable right click"/><category term="dynamic updation of Excel"/><category term="enable Developer Tab in Office 2010"/><category term="enable popup menu"/><category term="enable right click menu"/><category term="get the list of directories or files using VBA Dir  Function"/><category term="get the list of directories or files using VBA Functions"/><category term="insert field in 2010"/><category term="insert field in Word 2007"/><category term="install an Excel Add-in using VBA"/><category term="late binding"/><category term="msgbox responses in VBA"/><category term="msoFlipVertical"/><category term="open all Excel Workbooks under a particular directory"/><category term="read-only attributes"/><category term="select a Shell folder"/><category term="simulate speech Echo in VBA"/><category term="vbDirectory"/><category term="vba code to Hide and unhide Worksheet"/><category term="xlDialogSheet"/><title type='text'>VBA Tips &amp;amp; Tricks</title><subtitle type='html'>Welcome to VBA Tips &amp;amp; Tricks.&#xa;&#xa;All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too&#xa;&#xa;Happy reading</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>350</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-28492262.post-5681013199813809709</id><published>2014-01-25T05:36:00.003-08:00</published><updated>2014-01-25T05:36:54.406-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="No of occurrences using Find Method Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="VBA Find Method Example"/><category scheme="http://www.blogger.com/atom/ns#" term="Wild Cards in VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Find Strings"/><title type='text'>How to Extract Wild Card Matches in Word Document using Word VBA / Export Find Matches to Text File using VBA</title><content type='html'>&lt;h2&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;

How to use Word VBA to Find Wild Card Matches in Multiple Word Documents and Extract them&amp;nbsp;&lt;/span&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/h2&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;There are many situations where a particular format throughout the document that needs to be extracted. The answer would be&amp;nbsp;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;br /&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;1) Wild Card Search&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;br /&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;2) Regular expressions&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;br /&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;Lets consider wild card search for this post for a document that contains Reference Citations within square brackets [...]&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;br /&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;The following snippet Loops through all documents in a folder, opens them and searches for content within Square Brackets&amp;nbsp;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;br /&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;
It exports the matches to a Text File (Can store in Excel also)&lt;br /&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;
&lt;om name=&quot;Om Ganeshaya Namaha/&quot;&gt;&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;&lt;om name=&quot;Om Varahi Namaha&quot;&gt;&lt;om name=&quot;Om Saravana Bhava&quot;&gt;&lt;om name=&quot;Om Sai Ram&quot;&gt;&lt;om name=&quot;Om Namah Shivaya&quot;&gt;&lt;om name=&quot;Om Shakthi&quot;&gt;&lt;om name=&quot;Om Namo Narayanana&quot;&gt;&lt;om name=&quot;Jai Shri Ram&quot;&gt;&lt;om name=&quot;Hari Om!&quot;&gt;&lt;br /&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Sub Extract_WildCard_Matches()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Dim sWildCard As String&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Dim sDir&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Dim oWD As Word.Document&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Dim sPath As String&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;sWildCard = &quot;\[[!\[\]]{1,}\]&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;sPath = &quot;C:\Documents\&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;sDir = Dir$(sPath &amp;amp; &quot;*.docx&quot;, vbNormal)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Do Until LenB(sDir) = 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;Set oWD = Documents.Open(sPath &amp;amp; sDir)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; Open &quot;C:\Match_Output.txt&quot; For Append As #1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Selection.HomeKey wdStory, wdMove&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Selection.Find.Execute FindText:=sWildCard, MatchWildcards:=True&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Do While Selection.Find.Found&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Print #1, ActiveDocument.Name &amp;amp; vbTab &amp;amp; Selection.Range.Text&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Selection.Range.Collapse wdCollapseEnd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Selection.Find.Execute&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Loop&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; Close #1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;oWD.Close False&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;sDir = Dir$&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Loop&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/5681013199813809709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2014/01/how-to-extract-wild-card-matches-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/5681013199813809709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/5681013199813809709'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2014/01/how-to-extract-wild-card-matches-in.html' title='How to Extract Wild Card Matches in Word Document using Word VBA / Export Find Matches to Text File using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4650725627713136454</id><published>2013-10-14T09:17:00.001-07:00</published><updated>2013-10-14T09:17:17.430-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Login to Website using Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Programmaticaly search text in Google"/><category scheme="http://www.blogger.com/atom/ns#" term="SendKeys"/><title type='text'>How to Login to a HTTPS Website PopUp using Excel VBA</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG_AwzQQ6PN31Ino_bryDb64k73Z20gNERCSJ_lzOgSl6M65lZmsuHgTDh1MnQQtstY03n4rqUex99f6vP7Swts3qtg26UfrGZrjDFdTxug8VXUnz0zYTXzm8huwDFrYXZ3zEi/s1600/Website+Login+Popup+VBA+Coding.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;181&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG_AwzQQ6PN31Ino_bryDb64k73Z20gNERCSJ_lzOgSl6M65lZmsuHgTDh1MnQQtstY03n4rqUex99f6vP7Swts3qtg26UfrGZrjDFdTxug8VXUnz0zYTXzm8huwDFrYXZ3zEi/s320/Website+Login+Popup+VBA+Coding.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;om name=&quot;Om Ganeshaya Namaha&quot;&gt;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;
&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;
&lt;om name=&quot;Om Varahi Namaha&quot;&gt;
&lt;om name=&quot;Om Saravana Bhava&quot;&gt;
&lt;om name=&quot;Om Sai Ram&quot;&gt;
&lt;om name=&quot;Om Namah Shivaya&quot;&gt;
&lt;om name=&quot;Om Shakthi&quot;&gt;
&lt;om name=&quot;Om Namo Narayana&quot;&gt;
&lt;om name=&quot;Hari Om!&quot;&gt;
&lt;om name=&quot;Jai Shri Ram&quot;&gt;

&lt;b&gt;Control Login Popup from Excel VBA&amp;nbsp;&lt;/b&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/span&gt;&lt;/om&gt;&lt;br /&gt;
&lt;br /&gt;
The new HTTPS popups cause lot of irritation to the developers who have coded for it before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have tried to circumvent it using SendKeys. Please have a look at the snippet below and share your views on it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Set ie = CreateObject(&quot;InternetExplorer.Application.1&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ie.Visible = True&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ie.navigate cURL&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Application.Wait (Now + TimeValue(&quot;0:00:10&quot;))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If ie.readyState = READYSTATE_LOADING Then&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set objShellWindows = New ShellWindows&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Application.SendKeys &quot;abcd&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Application.SendKeys &quot;{TAB}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Application.SendKeys &quot;pwd123&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Application.SendKeys &quot;{TAB}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Application.SendKeys &quot;{RETURN}&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;Do While ie.Busy: DoEvents: Loop&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set doc = ie.Document&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4650725627713136454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2013/10/how-to-login-to-https-website-popup.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4650725627713136454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4650725627713136454'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2013/10/how-to-login-to-https-website-popup.html' title='How to Login to a HTTPS Website PopUp using Excel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjG_AwzQQ6PN31Ino_bryDb64k73Z20gNERCSJ_lzOgSl6M65lZmsuHgTDh1MnQQtstY03n4rqUex99f6vP7Swts3qtg26UfrGZrjDFdTxug8VXUnz0zYTXzm8huwDFrYXZ3zEi/s72-c/Website+Login+Popup+VBA+Coding.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-2535227478182669341</id><published>2013-05-26T22:46:00.000-07:00</published><updated>2013-05-26T22:46:37.558-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Add Notes to PowerPoint"/><category scheme="http://www.blogger.com/atom/ns#" term="Automate Powerpoint"/><category scheme="http://www.blogger.com/atom/ns#" term="Extract Powerpoint Slides"/><category scheme="http://www.blogger.com/atom/ns#" term="Retrieve TextBox Content from Powerpoint VBA"/><title type='text'>Convert PowerPoint TextBox Slides as Notes using VBA</title><content type='html'>&lt;om name=&quot;Om Ganeshaya Namaha&quot;&gt;
&lt;om name=&quot;Om Satguru Seshadri Swamigal Thiruvadike&quot;&gt;
&lt;om name=&quot;Om Varahi Namaha&quot;&gt;
&lt;om name=&quot;Om Saravana Bhava&quot;&gt;
&lt;om name=&quot;Om Sai Ram&quot;&gt;
&lt;om name=&quot;Om Namah Shivaya&quot;&gt;
&lt;om name=&quot;Om Shakthi&quot;&gt;
&lt;om name=&quot;Om Namo Narayana&quot;&gt;
&lt;om name=&quot;Hari Om!&quot;&gt;
&lt;om name=&quot;Jai Shri Ram!&quot;&gt;

&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;How to Add Notes to Powerpoint Slides using VBA&lt;/b&gt; &lt;/span&gt;&lt;/span&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;&lt;/om&gt;

&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has been quite some time since I posted in this blog. &lt;a href=&quot;http://vbadud.blogspot.in/2010/05/how-to-extract-textbox-contents-from.html#comment-form&quot;&gt;Murugan&lt;/a&gt; had kindled that in the form of&amp;nbsp;the following snippet. We are had earlier tried &lt;a href=&quot;http://vbadud.blogspot.in/2006/07/vba-creating-powerpoint-presentation.html&quot;&gt;Creating PowerPoint Presentation&lt;/a&gt; through VBA and &lt;a href=&quot;http://vbadud.blogspot.in/2012/05/how-to-save-powerpoint-presentation-as.html&quot;&gt;&lt;span style=&quot;color: #225588;&quot;&gt;Save  PowerPoint Presentation as PDF using VBA&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
This snippet converts the TextBoxes / Shapes with Text that are available in PowerPoint Slide to Notes Section. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Export_TextBoxes_AsNotes()
    
    Dim oPPT As Presentation
    Dim oSlide As Slide
    Dim oSlideShape As Shape
    Dim oNotesShape As Shape
    
    Set oPPT = ActivePresentation
    Set oSlide = oPPT.Slides(3)
    
    For Each oSlideShape In oSlide.Shapes
        
        If oSlideShape.HasTextFrame Then
        
            Set oNotesShape = oSlide.NotesPage.Shapes.AddShape(msoShapeRectangle, 54, 442, 432, 324) &#39;
            oNotesShape.TextFrame.TextRange.Text = oSlideShape.TextFrame.TextRange.Text
        
        End If
    
    Next
    
    If Not oSlide Is Nothing Then Set oSlide = Nothing
    If Not oPPT Is Nothing Then Set oPPT = Nothing
    

End Sub



&lt;/pre&gt;
See also:&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2008/07/delete-end-points-from-list-using.html&quot;&gt;&lt;span style=&quot;color: #225588;&quot;&gt;Delete  End Points from List using Powerpoint VBA&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2012/05/how-to-save-powerpoint-presentation-as.html&quot;&gt;&lt;span style=&quot;color: #225588;&quot;&gt;How  to Save PowerPoint Presentation as PDF using VBA&lt;/span&gt;&lt;/a&gt; &lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/2535227478182669341/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2013/05/convert-powerpoint-textbox-slides-as.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/2535227478182669341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/2535227478182669341'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2013/05/convert-powerpoint-textbox-slides-as.html' title='Convert PowerPoint TextBox Slides as Notes using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-2958284501540940639</id><published>2012-05-11T23:44:00.001-07:00</published><updated>2012-05-11T23:44:47.910-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PPT to PDF using VBA"/><title type='text'>How to Save PowerPoint Presentation as PDF using VBA</title><content type='html'>&lt;strong&gt;How to Convert PowerPoint Presentation PPT to PDF using VBA&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
PDF is always the universal format for sending the files. With lot of versions of MS Office and other Office suites around .. it is better to circulate the Deck as a PDF&lt;br /&gt;
&lt;br /&gt;
The following snippet converts the Presentation to a PDF and saves in the same folder of the PPT&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;ActivePresentation.ExportAsFixedFormat ActivePresentation.Path &amp;amp; &quot;\&quot; &amp;amp; ActivePresentation.Name &amp;amp; &quot;.pdf&quot;, ppFixedFormatTypePDF, ppFixedFormatIntentPrint

&lt;/pre&gt;
&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2009/07/how-to-create-pdf-from-word-document.html&quot;&gt;How to Create PDF from Word Document using VBA&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2012/01/how-to-convert-word-table-to-pdf-using.html&quot;&gt;How to Convert Word Table to PDF using VBA&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/2958284501540940639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/how-to-save-powerpoint-presentation-as.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/2958284501540940639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/2958284501540940639'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/how-to-save-powerpoint-presentation-as.html' title='How to Save PowerPoint Presentation as PDF using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4202829725097403177</id><published>2012-05-06T07:56:00.000-07:00</published><updated>2012-05-06T07:56:06.021-07:00</updated><title type='text'>Excel VBA TimeStamp – Milliseconds using Excel VBA</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;color: red; font-weight: bold;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;How to Get Time in Milliseconds using Excel VBA&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;The following function uses Timer function to get the milliseconds and append it to the current time&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Public Function TimeInMS() As String&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;  TimeInMS = Strings.Format(Now, &quot;dd-MMM-yyyy HH:nn:ss&quot;) &amp;amp; &quot;.&quot; &amp;amp; Strings.Right(Strings.Format(Timer, &quot;#0.00&quot;), 2)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End Function&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Timer function returns a &lt;b&gt;Single&lt;/b&gt; representing the number of seconds elapsed since midnight.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Another method is to use API Functions as shown below&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Private Type SYSTEMTIME&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wYear As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wMonth As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wDayOfWeek As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wDay As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wHour As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wMinute As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wSecond As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        wMilliseconds As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End Type&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Private Declare Sub GetSystemTime Lib &quot;kernel32&quot; _&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #999900;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;   (lpSystemTime As SYSTEMTIME)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Public Function TimeToMillisecond() As String&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Dim tSystem As SYSTEMTIME&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Dim sRet&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    On Error Resume Next&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    GetSystemTime tSystem&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    sRet = Hour(Now) &amp;amp; &quot;:&quot; &amp;amp; Minute(Now) &amp;amp; &quot;:&quot; &amp;amp; Second(Now) &amp;amp; _&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;      &quot;:&quot; &amp;amp; tSystem.wMilliseconds&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    TimeToMillisecond = sRet&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End Function&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Millisecond timer using VBA, How to get milliseconds in VBA Now() function, VBA Now() function, VBA Timer function , Excel VBA Timer, VBA Milliseconds &lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4202829725097403177/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/excel-vba-timestamp-milliseconds-using.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4202829725097403177'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4202829725097403177'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/excel-vba-timestamp-milliseconds-using.html' title='Excel VBA TimeStamp – Milliseconds using Excel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-3287255428801599116</id><published>2012-05-06T07:55:00.000-07:00</published><updated>2012-05-06T07:55:49.018-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel Addins using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA code"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Uninstall Addins"/><category scheme="http://www.blogger.com/atom/ns#" term="Uninstall Excel Addins using VBA"/><title type='text'>Excel VBA uninstall Excel Addins</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;color: red; font-weight: bold;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Programmatically uninstall Excel Addins using VBA&lt;/span&gt;&lt;/div&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Sub UnInstall_Addins_From_EXcel_AddinsList()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Dim oXLAddin As AddIn&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;For Each oXLAddin In Application.AddIns&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Debug.Print oXLAddin.FullName&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    If oXLAddin.Installed = True Then&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        oXLAddin.Installed = False&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    End If&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Next oXLAddin&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #000099;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/3287255428801599116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/excel-vba-uninstall-excel-addins.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3287255428801599116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3287255428801599116'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/excel-vba-uninstall-excel-addins.html' title='Excel VBA uninstall Excel Addins'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4574661418456799641</id><published>2012-05-06T07:54:00.001-07:00</published><updated>2012-05-06T07:54:37.228-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="display the embedded document as an Icon using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Embed Existing Word File to Spreadsheet using Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Embed PDF Document in Excel/Word using VBA"/><title type='text'>Embed Existing Word File to Spreadsheet using Excel VBA</title><content type='html'>&lt;h1 style=&quot;color: #ff6600;&quot;&gt;
&lt;span style=&quot;font-size: medium;&quot;&gt; &lt;span lang=&quot;EN-IN&quot;&gt;Insert Existing File (Word Document) to Spreadsheet using VBA&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Sub Insert_File_To_sheet()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Dim oWS As Worksheet                &#39; Worksheet Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Dim oOLEWd As OLEObject             &#39; OLE Word Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Dim oWD As Document                 &#39; Word Document Object (Use Microsoft Word Reference)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Set oWS = ActiveSheet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&#39; embed Word Document&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Set oOLEWd = oWS.OLEObjects.Add(Filename:=&quot;C:\VBADUD\Chapter 1.doc&quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oOLEWd.Name = &quot;EmbeddedWordDoc&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oOLEWd.Width = 400&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oOLEWd.Height = 400&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oOLEWd.Top = 30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&#39; Assign the OLE Object to Word Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;Set oWD = oOLEWd.Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oWD.Paragraphs.Add&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oWD.Paragraphs(oWD.Paragraphs.Count).Range.InsertAfter &quot;This is a sample embedded word document&quot;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;oOLEWd.Activate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff; line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;font-family: Verdana; font-size: 8.5pt;&quot;&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;If you want to embed other document like PDF etc, you can do the same by&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;    ActiveSheet.OLEObjects.Add Filename:=         &quot;C:\VBADUD\Sample_CH03.pdf&quot;, Link:=False, DisplayAsIcon:=         False&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;Display embedded document as Icon&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;If you want to display the embedded document as an Icon set DisplayAsIcon property to True&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 1.5pt 0in;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot; style=&quot;color: black; font-family: Verdana; font-size: 8.5pt;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4574661418456799641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/embed-existing-word-file-to-spreadsheet.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4574661418456799641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4574661418456799641'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/embed-existing-word-file-to-spreadsheet.html' title='Embed Existing Word File to Spreadsheet using Excel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4149842056043054539</id><published>2012-05-06T07:54:00.000-07:00</published><updated>2012-05-06T07:54:09.190-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Extract First Row of the Filtered Range using Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Get First Row of Excel AutoFilter using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Retrieve Command Line Arguments"/><title type='text'>Retrieve / Get First Row of Excel AutoFilter using VBA</title><content type='html'>&lt;div&gt;
&lt;span style=&quot;color: red; font-family: Calibri;&quot;&gt;&lt;strong&gt;Extract First Row of the Filtered Range using Excel VBA &lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;/span&gt; &lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;We can create filters programmatically using Excel VBA () and also add multiple criteria to it (). Once we get the filtered data, either we extract the same or iterate each row in it and do some operations. Here is one such simple program to extract the rows of filtered range using VBA&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;Sub&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt; Get_Filtered_Range()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; oWS &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Worksheet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; oRng &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; oColRng &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Dim&lt;/span&gt; oInRng &lt;span style=&quot;color: blue;&quot;&gt;As&lt;/span&gt; Range&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;On&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Error&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;GoTo&lt;/span&gt; Err_Filter&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oWS = ActiveSheet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oWS.UsedRange.AutoFilter(Field:=2, Criteria1:=&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Banana&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oRng = oWS.Cells.SpecialCells(xlCellTypeVisible)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oColRng = oWS.Range(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;A2:A5000&quot;&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oInRng = Intersect(oRng, oColRng)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;MsgBox(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;Filtered Range is &quot;&lt;/span&gt; &amp;amp; oInRng.Address)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;MsgBox(&lt;span style=&quot;color: #a31515;&quot;&gt;&quot;First Row Filtered Range is &quot;&lt;/span&gt; &amp;amp; oInRng.Rows(1).Row)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;Finally&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Not&lt;/span&gt; oWS &lt;span style=&quot;color: blue;&quot;&gt;Is&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;/span&gt; oWS = &lt;span style=&quot;color: blue;&quot;&gt;Nothing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;Err_Filter:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;If&lt;/span&gt; Err &amp;lt;&amp;gt; 0 &lt;span style=&quot;color: blue;&quot;&gt;Then&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;   &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;         &lt;/span&gt;MsgBox(Err.Description)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;            &lt;/span&gt;Err.Clear()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;GoTo&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;Finally&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;        &lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;End&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;If&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;&quot;&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt;End&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;&quot;&gt; &lt;span style=&quot;color: blue;&quot;&gt;Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6OpTwjBo4mDuBBi7fgD99N9gkcINu6suVWP9ZKr6KXTaozys_8sHE7NmJRW3jU2l7bQoIy7Jxm6180o48JGZs5OJxo4saOFjSKzUSoZu7FTSKtLN7K61w39Lsgnd8mAVWGZa9/s1600-h/DND_Filter_Original.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5233616172362485458&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6OpTwjBo4mDuBBi7fgD99N9gkcINu6suVWP9ZKr6KXTaozys_8sHE7NmJRW3jU2l7bQoIy7Jxm6180o48JGZs5OJxo4saOFjSKzUSoZu7FTSKtLN7K61w39Lsgnd8mAVWGZa9/s400/DND_Filter_Original.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1oxsKdx5AghmUl6bvIjQkzP9itK9Hm2T72p3s_GjiEto0pO48uuVzYh9c8im9PSTDJua-q81uomfToCjG3xoee5kA0Agzvn_wINltNU4jBSGxnyuTXM0-r34kpwdAeOo2GOMZ/s1600-h/DND_Filter_GetFirstRow.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5233616175907700514&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1oxsKdx5AghmUl6bvIjQkzP9itK9Hm2T72p3s_GjiEto0pO48uuVzYh9c8im9PSTDJua-q81uomfToCjG3xoee5kA0Agzvn_wINltNU4jBSGxnyuTXM0-r34kpwdAeOo2GOMZ/s400/DND_Filter_GetFirstRow.JPG&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4149842056043054539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/retrieve-get-first-row-of-excel.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4149842056043054539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4149842056043054539'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/retrieve-get-first-row-of-excel.html' title='Retrieve / Get First Row of Excel AutoFilter using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6OpTwjBo4mDuBBi7fgD99N9gkcINu6suVWP9ZKr6KXTaozys_8sHE7NmJRW3jU2l7bQoIy7Jxm6180o48JGZs5OJxo4saOFjSKzUSoZu7FTSKtLN7K61w39Lsgnd8mAVWGZa9/s72-c/DND_Filter_Original.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-6314007292436974370</id><published>2012-05-06T07:53:00.000-07:00</published><updated>2012-05-06T07:53:44.471-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Uninstall Word Addins using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Uninstall Word Templates (Addins / .DOT files) using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word Add-ins using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA"/><title type='text'>UnInstall Word Addins using VBA</title><content type='html'>&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span lang=&quot;EN-IN&quot;&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Here is a simple method to uninstall a Word Addin (.dot file) using Word VBA&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Private Sub UnInstalled_AllWordAddins()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Dim oAddin As AddIn&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    On Error GoTo Err_Addin&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    For Each oAddin In AddIns&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        If oAddin.Installed Then&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;            msg = oAddin.Name&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;            oAddin.Installed = False&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;        End If&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Next oAddin&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Finally:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    If Not oAddin Is Nothing Then Set oAddin = Nothing&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Err_Addin:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;If Err &amp;lt;  &amp;gt; 0 Then&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Err.Clear&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    GoTo Finally&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End If&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifkkGwNVfjqP3pHOwO1PafyJrhSgEw-8I0k_NcFqjGQfwBVrIo_nlTwLG6YJlwkOAIgT9vWyzgNf9MNmqwIKmH6LsW156KKq4MmFTjvLSKE8NrwzIrFPP7norpDHW8fcVUGwIY/s1600-h/dnd_wordaddin_afterprogram.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5256081561665541954&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifkkGwNVfjqP3pHOwO1PafyJrhSgEw-8I0k_NcFqjGQfwBVrIo_nlTwLG6YJlwkOAIgT9vWyzgNf9MNmqwIKmH6LsW156KKq4MmFTjvLSKE8NrwzIrFPP7norpDHW8fcVUGwIY/s400/dnd_wordaddin_afterprogram.JPG&quot; style=&quot;cursor: pointer;&quot; /&gt;Installed Word Addin&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfT8CpC1fBdVqQFEsRJvYKMuVo-xXaupwlnflf9XSwP2wAdsYEMvOxatHZVzsirtQaFKL2sIOZpWICBqOmjIjwT6HhGFtSqeEW2epvd8HJVXtuL65g7cOVrOqdTSEUGft28bKs/s1600-h/dnd_wordaddin_uninstalled.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5256081567188433938&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfT8CpC1fBdVqQFEsRJvYKMuVo-xXaupwlnflf9XSwP2wAdsYEMvOxatHZVzsirtQaFKL2sIOZpWICBqOmjIjwT6HhGFtSqeEW2epvd8HJVXtuL65g7cOVrOqdTSEUGft28bKs/s400/dnd_wordaddin_uninstalled.JPG&quot; style=&quot;cursor: pointer;&quot; /&gt;Word Addin List after Macro Execution. Addin is uninstalled (not removed)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/6314007292436974370/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/uninstall-word-addins-using-vba.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/6314007292436974370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/6314007292436974370'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/uninstall-word-addins-using-vba.html' title='UnInstall Word Addins using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifkkGwNVfjqP3pHOwO1PafyJrhSgEw-8I0k_NcFqjGQfwBVrIo_nlTwLG6YJlwkOAIgT9vWyzgNf9MNmqwIKmH6LsW156KKq4MmFTjvLSKE8NrwzIrFPP7norpDHW8fcVUGwIY/s72-c/dnd_wordaddin_afterprogram.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-1050159820040162455</id><published>2012-05-06T07:52:00.000-07:00</published><updated>2012-05-06T07:52:47.896-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Add Ole Control to Word Document"/><category scheme="http://www.blogger.com/atom/ns#" term="AddOLEControl Command Buttons"/><category scheme="http://www.blogger.com/atom/ns#" term="Change Caption of Command Button using Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="VBA AddOLEControl Method"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA AddOLEControl"/><title type='text'>Word VBA add command buttons through code</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;color: red; font-weight: bold;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Add CommandButton to Word Document using VBA (through AddOLEControl)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Here is one of the ways to add a command button on a Word document using Word VBA&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;Sub Macro_Add_Button()&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Dim oCtl&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Dim oCmd&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Set oCtl = ActiveDocument.InlineShapes.AddOLEControl(ClassType:=&quot;Forms.CommandButton.1&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    Set oCmd = oCtl.OLEFormat.Object&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;    oCmd.Caption = &quot;Click Me...&quot;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;color: #3333ff;&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span lang=&quot;EN-IN&quot;&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiHGCO9ExRzKSEJVfjv9G36XIxq88mUx_4UINNxvW7ZzzTzo1FNbsJuOGDQ5tf2kIaah-M4jSROtmTLBw4UPzh6UmuCoJNbD6GyhDyBsg89vGtDr_NRLjOwSBpabqhyfnkda0s/s1600-h/dnd_Word_CommandButton_Add.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5256083535429099746&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiHGCO9ExRzKSEJVfjv9G36XIxq88mUx_4UINNxvW7ZzzTzo1FNbsJuOGDQ5tf2kIaah-M4jSROtmTLBw4UPzh6UmuCoJNbD6GyhDyBsg89vGtDr_NRLjOwSBpabqhyfnkda0s/s400/dnd_Word_CommandButton_Add.JPG&quot; style=&quot;cursor: pointer;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/1050159820040162455/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/word-vba-add-command-buttons-through.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/1050159820040162455'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/1050159820040162455'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/word-vba-add-command-buttons-through.html' title='Word VBA add command buttons through code'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgiHGCO9ExRzKSEJVfjv9G36XIxq88mUx_4UINNxvW7ZzzTzo1FNbsJuOGDQ5tf2kIaah-M4jSROtmTLBw4UPzh6UmuCoJNbD6GyhDyBsg89vGtDr_NRLjOwSBpabqhyfnkda0s/s72-c/dnd_Word_CommandButton_Add.JPG" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-3591440017259430048</id><published>2012-05-06T07:50:00.000-07:00</published><updated>2012-05-06T07:50:57.206-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel to Word using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA copy text to Word document"/><category scheme="http://www.blogger.com/atom/ns#" term="How to copy text from Excel Range to Word bookmark"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Bookmarks"/><title type='text'>Update Word Document with Excel Information using VBA</title><content type='html'>&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Excel Range to Word Template using VBA&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Most often we maintain list of contacts in Excel workbook and it needs to be transferred to Word document (made from some template). Here is a simple snippet that can help:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;The code is used to copy the content from Excel range shown below to a Word document:&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; margin: auto auto auto 4.65pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184; width: 432px;&quot;&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;tbody&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(247, 150, 70); border-color: rgb(250, 192, 144) rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144); border-style: solid none solid solid; border-width: 1pt medium 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-left-alt: solid #FAC090 .5pt; mso-border-top-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 89pt;&quot; valign=&quot;bottom&quot; width=&quot;119&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(247, 150, 70); border-color: rgb(250, 192, 144) rgb(240, 240, 240); border-style: solid none; border-width: 1pt medium; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-top-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;ContactNo&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(247, 150, 70); border-color: rgb(250, 192, 144) rgb(240, 240, 240); border-style: solid none; border-width: 1pt medium; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-top-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 54pt;&quot; valign=&quot;bottom&quot; width=&quot;72&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Address&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(247, 150, 70); border-color: rgb(250, 192, 144) rgb(250, 192, 144) rgb(250, 192, 144) rgb(240, 240, 240); border-style: solid solid solid none; border-width: 1pt 1pt 1pt medium; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-right-alt: solid #FAC090 .5pt; mso-border-top-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 116pt;&quot; valign=&quot;bottom&quot; width=&quot;155&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Email&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 1;&quot;&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144); border-style: none none solid solid; border-width: medium medium 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-left-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 89pt;&quot; valign=&quot;bottom&quot; width=&quot;119&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Christina&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144); border-style: none none solid; border-width: medium medium 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;516 418 1234&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144); border-style: none none solid; border-width: medium medium 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 54pt;&quot; valign=&quot;bottom&quot; width=&quot;72&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Cincinatti&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144) rgb(240, 240, 240); border-style: none solid solid none; border-width: medium 1pt 1pt medium; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-right-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 116pt;&quot; valign=&quot;bottom&quot; width=&quot;155&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: blue; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;a href=&quot;mailto:Christina@vbadud.com&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Christina@vbadud.com&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 2;&quot;&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background-color: transparent; border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144); border-style: none none solid solid; border-width: medium medium 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-left-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 89pt;&quot; valign=&quot;bottom&quot; width=&quot;119&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Girish Kutty&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background-color: transparent; border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144); border-style: none none solid; border-width: medium medium 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;516 418 6752&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background-color: transparent; border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144); border-style: none none solid; border-width: medium medium 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 54pt;&quot; valign=&quot;bottom&quot; width=&quot;72&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Cincinatti&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background-color: transparent; border-color: rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144) rgb(240, 240, 240); border-style: none solid solid none; border-width: medium 1pt 1pt medium; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-right-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 116pt;&quot; valign=&quot;bottom&quot; width=&quot;155&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: blue; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;a href=&quot;mailto:gkutty@vbadud.com&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;gkutty@vbadud.com&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;
&lt;tr style=&quot;height: 15pt; mso-yfti-irow: 3; mso-yfti-lastrow: yes;&quot;&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144); border-style: none none solid solid; border-width: medium medium 1pt 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-left-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 89pt;&quot; valign=&quot;bottom&quot; width=&quot;119&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Ravichand Koneru&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144); border-style: none none solid; border-width: medium medium 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 65pt;&quot; valign=&quot;bottom&quot; width=&quot;87&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;777 213 213&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(240, 240, 240) rgb(250, 192, 144); border-style: none none solid; border-width: medium medium 1pt; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 54pt;&quot; valign=&quot;bottom&quot; width=&quot;72&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;span style=&quot;color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Boston&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style=&quot;background: rgb(253, 233, 217); border-color: rgb(240, 240, 240) rgb(250, 192, 144) rgb(250, 192, 144) rgb(240, 240, 240); border-style: none solid solid none; border-width: medium 1pt 1pt medium; height: 15pt; mso-border-bottom-alt: solid #FAC090 .5pt; mso-border-right-alt: solid #FAC090 .5pt; padding: 0cm 5.4pt; width: 116pt;&quot; valign=&quot;bottom&quot; width=&quot;155&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin: 0cm 0cm 0pt;&quot;&gt;
&lt;u&gt;&lt;span style=&quot;color: blue; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;&quot;&gt;&lt;a href=&quot;mailto:rkoneru@vbadud.com&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;rkoneru@vbadud.com&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Sub CopY_Data_To_Word()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Dim oWA As Word.Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Dim oWD As Word.Document&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Set oWA = New Word.Application&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Set oWD = oWA.Documents.Add(&quot;C:\Users\comp\Documents\Doc2.dot&quot;) &#39; Replace with your template here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;For i1 = 2 To Cells.SpecialCells(xlCellTypeLastCell).Row&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oWD.Bookmarks(&quot;Name&quot;).Range.Text = Cells(i1, 1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oWD.Bookmarks(&quot;ContactNo&quot;).Range.Text = Cells(i1, 2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oWD.Bookmarks(&quot;Address&quot;).Range.Text = Cells(i1, 3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;oWD.Bookmarks(&quot;Email&quot;).Range.Text = Cells(i1, 4)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;    &lt;/span&gt;&#39;Code for saving the document&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Next i1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&#39; Releasing objects etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;color: #0070c0;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Bookmarks are added to the Word template and whenever a new document is created from the template, the document has those bookmarks.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0cm 0cm 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;The code above places the information from the Excel sheet to the specific Bookmark ranges&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &amp;quot;Calibri&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 11pt; line-height: 115%; mso-ansi-language: EN-IN; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;&quot;&gt;&lt;br clear=&quot;all&quot; style=&quot;mso-special-character: line-break; page-break-before: always;&quot; /&gt;&lt;/span&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZu9O9vgwUc4Mic8Pi_0RU2S5uI-vM6UkUR9yDOnEAyDpyJuePstmERRR-A6FTHCkAx0ZSab18NouCDPRKK8MrN_KxmvRD4A3eXdqr9_hHJCVBpTufcdA6CFbZxw3kv9QiTAL9/s1600-h/dnd_Excel_Word.JPG&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; id=&quot;BLOGGER_PHOTO_ID_5372609354616366674&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZu9O9vgwUc4Mic8Pi_0RU2S5uI-vM6UkUR9yDOnEAyDpyJuePstmERRR-A6FTHCkAx0ZSab18NouCDPRKK8MrN_KxmvRD4A3eXdqr9_hHJCVBpTufcdA6CFbZxw3kv9QiTAL9/s400/dnd_Excel_Word.JPG&quot; style=&quot;height: 291px; width: 400px;&quot; /&gt;&lt;/a&gt;Excel to Word using VBA &lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/3591440017259430048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/update-word-document-with-excel.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3591440017259430048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3591440017259430048'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/update-word-document-with-excel.html' title='Update Word Document with Excel Information using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZu9O9vgwUc4Mic8Pi_0RU2S5uI-vM6UkUR9yDOnEAyDpyJuePstmERRR-A6FTHCkAx0ZSab18NouCDPRKK8MrN_KxmvRD4A3eXdqr9_hHJCVBpTufcdA6CFbZxw3kv9QiTAL9/s72-c/dnd_Excel_Word.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-8726063607707754331</id><published>2012-05-02T18:15:00.001-07:00</published><updated>2012-05-02T18:15:45.465-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Create ReadOnly Files"/><category scheme="http://www.blogger.com/atom/ns#" term="FileSystemObject"/><category scheme="http://www.blogger.com/atom/ns#" term="How to Make a file ReadOnly"/><category scheme="http://www.blogger.com/atom/ns#" term="SetAttr Function"/><title type='text'>How to Make a File ReadOnly using Excel VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;How to Create ReadOnly Files using VBA - Excel VBA ReadOnly Function&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
There are many occassions where you want to save the file as Readonly (at times with a Password protection) after you complete the process. We have talked about &lt;a href=&quot;http://vbadud.blogspot.in/2007/05/changing-file-attributes.html&quot;&gt;SetAttr&lt;/a&gt; that changes the file attributes. Now let us see how to do this using FileSystemObject&lt;br /&gt;
&lt;br /&gt;
Please refer &lt;a href=&quot;http://vbadud.blogspot.in/2010/05/how-to-iterate-through-all.html&quot;&gt;How to iterate through all Subdirectories till the last directory in VBA&lt;/a&gt;&amp;nbsp;to know how to include the references if you are using Early binding. &lt;br /&gt;
&lt;br /&gt;
The following snippet uses late binding&amp;nbsp;and shows how to set the file as read-only&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Function MakeFileReadOnly(ByVal sFile As String)

Dim strSaveFilename As String

Dim oFSO As Object      &#39;Scripting.FileSystemObject
Dim oFile As Object     &#39;Scripting.File


    &#39; Create Objects
    &#39; Uses Late Binding
    Set oFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
    Set oFile = oFSO.GetFile(FilePath:=sFile)

    &#39; Set file to be read-only
    oFile.Attributes = 1
 
    &#39; Releasing Objects
    If Not oFSO Is Nothing Then Set oFSO = Nothing
    If Not oFile Is Nothing Then Set oFile = Nothing

End Function
&lt;/pre&gt;
The function is not restricted to Excel files alone and can be used for any kind of files

&lt;br /&gt;
&lt;br /&gt;
Once You are done you can&amp;nbsp; &lt;a href=&quot;http://vbadud.blogspot.in/2007/05/check-workbook-attributes.html&quot;&gt;Check Workbook Attributes&lt;/a&gt;&amp;nbsp;to confirm if the Workbook is ReadOnly</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/8726063607707754331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/05/how-to-make-file-readonly-using-excel.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8726063607707754331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8726063607707754331'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/05/how-to-make-file-readonly-using-excel.html' title='How to Make a File ReadOnly using Excel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-5264380783368879223</id><published>2012-02-29T18:15:00.000-08:00</published><updated>2012-02-29T18:15:53.267-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Convert Text to Hyperlinks using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Hyperlinks in Excel VBA"/><title type='text'>How to Create Hyperlinks in multiple cells using EXcel VBA</title><content type='html'>How to Link Cells to Files/Folders using Excel VBA&lt;br /&gt;
&lt;br /&gt;
There are many cases where we want to have a Hyperlink on a cell that opens a document / image etc.&lt;br /&gt;
In the following snippet we can see how that works&lt;br /&gt;
&lt;br /&gt;
The sheet is the Master Sheet, which contains the list of Products that are compared. The comparison reports for these products are placed in separate files in the same folder.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUsMWi2UajZUcxMcIoG1kE8mjH8-g8jlN0qsGLobbxfzlV0XI4wUft9-2O4xlyJg3fDLXYaqKqdSxqK0K2ngtQOdje_eymh0jqfNJyHoDj1-aCLNshmYGvmguO95Okkz2WTUX/s1600/Create+Hyperlinks+for+Multiple+Cells.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUsMWi2UajZUcxMcIoG1kE8mjH8-g8jlN0qsGLobbxfzlV0XI4wUft9-2O4xlyJg3fDLXYaqKqdSxqK0K2ngtQOdje_eymh0jqfNJyHoDj1-aCLNshmYGvmguO95Okkz2WTUX/s640/Create+Hyperlinks+for+Multiple+Cells.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The hyperlink uses Relative path - you can hardcode this to any particular folder&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Create_HyperLinks()

Dim i1 As Integer
Dim sA, sB As String

For i1 = 2 To Cells.SpecialCells(xlCellTypeLastCell).Row
    If LenB(Trim$(Cells(i1, 3).Value)) &amp;lt;&amp;gt; 0 Then
        sA = Trim$(Cells(i1, 1).Value)
        sB = Trim$(Cells(i1, 2).Value)
        sA = &quot;Compared_&quot; &amp;amp; sA &amp;amp; &quot;_&quot; &amp;amp; sB &amp;amp; &quot;.xls&quot;
        Sheets(1).Range(&quot;C&quot; &amp;amp; i1).Hyperlinks.Add Cells(i1, 3), &quot;CompareReports\&quot; &amp;amp; sA
    End If
Next i1


End Sub
&lt;/pre&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;See also: &lt;a href=&quot;http://vbadud.blogspot.in/2007/12/convert-urls-to-hyperlinks-using-vba.html&quot;&gt;Convert URLs to Hyperlinks using VBA&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/5264380783368879223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/02/how-to-create-hyperlinks-in-multiple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/5264380783368879223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/5264380783368879223'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/02/how-to-create-hyperlinks-in-multiple.html' title='How to Create Hyperlinks in multiple cells using EXcel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZUsMWi2UajZUcxMcIoG1kE8mjH8-g8jlN0qsGLobbxfzlV0XI4wUft9-2O4xlyJg3fDLXYaqKqdSxqK0K2ngtQOdje_eymh0jqfNJyHoDj1-aCLNshmYGvmguO95Okkz2WTUX/s72-c/Create+Hyperlinks+for+Multiple+Cells.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-8848277014289304579</id><published>2012-02-29T17:57:00.000-08:00</published><updated>2012-02-29T17:57:18.181-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Convert Text to Array in Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Transpose"/><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA WorksheetFunction Transpose Function"/><title type='text'>How to Split Text in a Cell to Multiple Cells using Excel VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;Convert a Text to Range using Excel VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
The following snippet converts the Text to an Array by splitting using SemiColon delimiter and uses the Transpose Function to place it in the Range&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub ConvertText2Range()

Dim sText As String, arText

sText = Range(&quot;c16&quot;).Value

arText = Split(sText, &quot;;&quot;)

Range(&quot;D16:D&quot; &amp;amp; CStr(16 + UBound(arText))).Value = WorksheetFunction.Transpose(arText)
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LF0CFEc7daatBr7nvgz1U1nZSNgCMB5I0FCD1PpY5UBGQXxjYZ6bM3cEpiKLiWQRwpcSAT4TsxEbKhCSj5PRFIAbi7rECX8t-r2fgr8EyPTw-fHyr3K-0AMF4u1SQFHC028F/s1600/Splitting+Text+Across+Multiple+Ranges.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LF0CFEc7daatBr7nvgz1U1nZSNgCMB5I0FCD1PpY5UBGQXxjYZ6bM3cEpiKLiWQRwpcSAT4TsxEbKhCSj5PRFIAbi7rECX8t-r2fgr8EyPTw-fHyr3K-0AMF4u1SQFHC028F/s640/Splitting+Text+Across+Multiple+Ranges.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/8848277014289304579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/02/how-to-split-text-in-cell-to-multiple.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8848277014289304579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8848277014289304579'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/02/how-to-split-text-in-cell-to-multiple.html' title='How to Split Text in a Cell to Multiple Cells using Excel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-LF0CFEc7daatBr7nvgz1U1nZSNgCMB5I0FCD1PpY5UBGQXxjYZ6bM3cEpiKLiWQRwpcSAT4TsxEbKhCSj5PRFIAbi7rECX8t-r2fgr8EyPTw-fHyr3K-0AMF4u1SQFHC028F/s72-c/Splitting+Text+Across+Multiple+Ranges.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4779964329421771509</id><published>2012-02-03T09:26:00.000-08:00</published><updated>2012-02-04T03:20:40.876-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Add Comments in Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Comments.Add in Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Delete Comments using VBA"/><title type='text'>How to convert Excel Text to Comments using VBA</title><content type='html'>&lt;span style=&quot;color: red; font-size: large;&quot;&gt;Convert Excel Range to Comments using VBA&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
We have seen how to &lt;a href=&quot;-http://vbadud.blogspot.in/2008/09/convert-excel-comments-to-text-using.html&quot;&gt;Copy Comments in an Excel Sheet to a Range&lt;/a&gt;; now let us see how to do the opposite&lt;br /&gt;
&lt;br /&gt;
Our reference Excel has Text that needs to be converted as Comments on Column E, which needs to be placed as comments &lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGwyBEC8pbKsiGL9tF-r3Ut2La6do7vkztjdKnC_MxfSJZRsnhRxnQH1Ss1lq8cBRrkZMXubT6bQ5hBfB3hhPSw0wzmDaTtwUn4CeDy7G6h94_K-F13dfghZyFfGqaDT68Jp-S/s1600/Excel+Add+Comments+2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGwyBEC8pbKsiGL9tF-r3Ut2La6do7vkztjdKnC_MxfSJZRsnhRxnQH1Ss1lq8cBRrkZMXubT6bQ5hBfB3hhPSw0wzmDaTtwUn4CeDy7G6h94_K-F13dfghZyFfGqaDT68Jp-S/s640/Excel+Add+Comments+2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Convert_Text_To_Comments()

Dim sText As String     &#39; Comment String
Dim i1 As Long          &#39; Counter
Dim sUser As String     &#39; User Name

sUser = Application.UserName

For i1 = 1 To ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
    
    sText = ActiveSheet.Cells(i1, 5).Value
       
    &#39;Deletes Existing Comments
    Cells(i1, 3).ClearComments
    
    &#39; Creates Comment
    Cells(i1, 3).AddComment
    Cells(i1, 3).Comment.Text Text:=sUser &amp;amp; Chr(10) &amp;amp; sText
    
Next i1




End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
If you already have comments and try to AddComment then Runtime Error 1004 will be thrown. That is why it is better to Remove the existing comments (ClearComments) and proceed with Adding new comment&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDG4twZJTh0LceMWNy819CPrLkOSPr8vwQOjJ0oqJ9qtt54nE8uhTApfKTDKbO1TyqhQkRFNZ3xtf7HoLb1a_vLuT0xpZpzOEoljn3KBkHeOtAB6ItdZbOGSdWzrQJzwslY30C/s1600/Excel+Add+Comments.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDG4twZJTh0LceMWNy819CPrLkOSPr8vwQOjJ0oqJ9qtt54nE8uhTApfKTDKbO1TyqhQkRFNZ3xtf7HoLb1a_vLuT0xpZpzOEoljn3KBkHeOtAB6ItdZbOGSdWzrQJzwslY30C/s320/Excel+Add+Comments.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4779964329421771509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/02/how-to-convert-excel-text-to-comments.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4779964329421771509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4779964329421771509'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/02/how-to-convert-excel-text-to-comments.html' title='How to convert Excel Text to Comments using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGwyBEC8pbKsiGL9tF-r3Ut2La6do7vkztjdKnC_MxfSJZRsnhRxnQH1Ss1lq8cBRrkZMXubT6bQ5hBfB3hhPSw0wzmDaTtwUn4CeDy7G6h94_K-F13dfghZyFfGqaDT68Jp-S/s72-c/Excel+Add+Comments+2.png" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-8261303115155648000</id><published>2012-01-30T19:11:00.000-08:00</published><updated>2012-01-30T19:11:31.310-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Document Comments using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Comments"/><title type='text'>How to Extract Comment information from Word VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;How to Extract Comments Text and Related Information from Word Document using VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Here is a hint of accessing the comments and related information using VBA&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Get_Comment_Information()

Dim oComment As Comment
Dim oCommentRange As Range

For i1 = 1 To ActiveDocument.Comments.Count
    Set oComment = ActiveDocument.Comments(i1)
    Set oCommentRange = oComment.Scope.Paragraphs(1).Range
    Debug.Print &quot;Page : &quot; &amp; oCommentRange.Information(wdActiveEndPageNumber) &amp; vbTab _
                     &amp; &quot;Line : &quot; &amp; oCommentRange.Information(wdFirstCharacterLineNumber) &amp; vbTab

    

Next i1

End Sub
&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/8261303115155648000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-extract-comment-information-from.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8261303115155648000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8261303115155648000'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-extract-comment-information-from.html' title='How to Extract Comment information from Word VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-3724296348302520279</id><published>2012-01-30T19:09:00.000-08:00</published><updated>2012-01-30T19:09:10.115-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ListFormat in Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Tag List Items in Word VBA"/><title type='text'>How to Identify and Tag Numbered Lists using VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;How to Identify and Tag Bullet Lists using VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Following snippet identifies a Bulleted List and Tags all Bullet List items and the Bulletted List as a whole&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Tag_Lists()

Dim oBL As ListFormat
Dim oList As List
Dim oLI

    For Each oList In ActiveDocument.Lists
        If oList.Range.ListFormat.ListType = WdListType.wdListBullet Then
            For Each oLI In oList.ListParagraphs
                oLI.Range.InsertBefore &quot;
&lt;li&gt;&quot;                  oLI.Range.InsertAfter &quot;&lt;/li&gt;
&quot;
            Next oLI
            oList.Range.InsertBefore &quot;&lt;ol&gt;&quot;             oList.Range.InsertAfter &quot;&lt;/ol&gt;&quot;
        End If
    Next oList


 End Sub

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/3724296348302520279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-identify-and-tag-numbered-lists.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3724296348302520279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3724296348302520279'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-identify-and-tag-numbered-lists.html' title='How to Identify and Tag Numbered Lists using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-3127896672031708160</id><published>2012-01-30T19:03:00.000-08:00</published><updated>2012-01-30T19:03:16.733-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Compare Formatting Changes in Word Document using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Compare Headers and Footers in Word Document using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Compare Word Documents"/><title type='text'>Compare Word Documents with Headers and Footers using VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: orange;&quot;&gt;How to Compare Word Documents Programatically using Word VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Word Documents are everywhere .. proposals, tenders, notes, technical papers. In many cases there are more than one authors and more than five reviewers.&amp;nbsp;There is a devil in everyone which comes out when reviewing the document. Suggest some changes.. boldface&amp;nbsp; some text, markup some paragraph and screw the document. If you are&amp;nbsp; the author it is your responsibility to ensure that the changes get reflected. There are many document management solutions that are available for parallel working. &lt;br /&gt;
&lt;br /&gt;
Just in case you get a document reviewed by your boss (and without track changes) and you want to know what he/she has done use the following&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub CompareDoc()

Dim oDoc1 As Document
Dim oDoc2 As Document

Set oDoc1 = Documents.Open(&quot;D:\Changed Header.doc&quot;)
Set oDoc2 = Documents.Open(&quot;D:\Original Header.doc&quot;)
Application.CompareDocuments oDoc1, oDoc2, wdCompareDestinationNew, , , , , , True, True

End Sub
&lt;/pre&gt;&lt;br /&gt;
This compares two documents and creates a new document with Track Changes showing the changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are lot of parameters to CompareDocuments method. The notable being CompareFormatting, CompareHeaders, CompareFootnotes. The last two ones are used if you want to know the changes made in Headers and Footers. Who knows you would have kept the same header from the document you cloned and your boss would have noticed and changed it. Do you want to take risk of ignoring that&lt;br /&gt;
&lt;br /&gt;
See also&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2007/12/comparing-two-word-documents-using-word.html&quot;&gt;Comparing two Word Documents using Word VBA&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2007/05/compare-files-by-date.html&quot;&gt;Compare Files by Date&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/3127896672031708160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/compare-word-documents-with-headers-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3127896672031708160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/3127896672031708160'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/compare-word-documents-with-headers-and.html' title='Compare Word Documents with Headers and Footers using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-8436924119930987141</id><published>2012-01-30T18:50:00.000-08:00</published><updated>2012-01-30T18:50:22.885-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Convert document to PDF using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Tables to PDF using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word to PDF using VBA"/><title type='text'>How to Convert Word Table to PDF using VBA</title><content type='html'>&lt;span style=&quot;color: orange;&quot;&gt;&lt;strong&gt;Export Word Table as PDF using VBA&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Anyone who is using Word for quite sometime will agree that Tables and Images are bit scary when it comes to viewing across versions or machines. A Table which looks great in your machine might not look so if he uses a different version of Word. &lt;br /&gt;
&lt;br /&gt;
In that case it is better to have the Table converted as PDF in your machine and circulate the same. In last post we saw &lt;a href=&quot;http://vbadud.blogspot.in/2012/01/how-to-export-parts-of-document-using.html&quot;&gt;how to export part of text to a new document&lt;/a&gt; using ExportFragment method. Here we export a Table as PDF using ExportAsFixedFormat method. &lt;br /&gt;
&lt;br /&gt;
The following snippet does exactly the same:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Table2PDF()

Dim oTab As Word.Table
Dim oRange As Word.Range

Set oTab = ActiveDocument.Tables(1)

oTab.Range.ExportAsFixedFormat &quot;D:\Documents and Settings\Admin\My Documents\Tab_PDF.pdf&quot;, wdExportFormatPDF

End Sub
&lt;/pre&gt;&lt;br /&gt;
See also:&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2009/07/how-to-create-pdf-from-word-document.html&quot;&gt;Convert Word to PDF using&amp;nbsp;VBA&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/8436924119930987141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-convert-word-table-to-pdf-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8436924119930987141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8436924119930987141'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-convert-word-table-to-pdf-using.html' title='How to Convert Word Table to PDF using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-7544337168931891504</id><published>2012-01-30T18:43:00.000-08:00</published><updated>2012-01-30T18:43:06.253-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Clone Document in Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Document Parts in Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="ExportFragment in Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Export Range to New Document"/><title type='text'>How to Export Parts of Document using Word VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Copy Content with Formatting to New Document using Word VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Not all the tens and hundreds of pages in a Word document interests you or matters to you. There are some documents, which we&amp;nbsp;use for reference.&amp;nbsp;All we need&amp;nbsp;is&amp;nbsp;a paragraph/section from the document.&amp;nbsp;If it is a&amp;nbsp;book we used to take a photo-copy of the same and&amp;nbsp;keep it in a folder. How to do the same in a Word document -&amp;nbsp;and in an automated way with all the formatting intact?&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;ExportFragment method in Word VBA&amp;nbsp;provides the solution. It creates a new document from the existing one&amp;nbsp;for the Range&amp;nbsp;of your choice.&lt;br /&gt;
&lt;br /&gt;
Here is an example where it exports eleventh paragraph of the document to a new one.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub PartofText()

Dim oWDRange As Word.Range

Set oWDRange = ActiveDocument.Paragraphs(11).Range
oWDRange.ExportFragment &quot;D:\Documents and Settings\Admin\My Documents\Reference_11.docx&quot;, wdFormatDocumentDefault

End Sub
&lt;/pre&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;See also&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;a href=&quot;http://vbadud.blogspot.in/2009/09/how-to-export-word-range-as-rtf-using.html&quot;&gt;How to export Word Range as RTF using VBA&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/7544337168931891504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-export-parts-of-document-using.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/7544337168931891504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/7544337168931891504'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-export-parts-of-document-using.html' title='How to Export Parts of Document using Word VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4931628925923960164</id><published>2012-01-30T18:34:00.000-08:00</published><updated>2012-01-30T18:34:32.391-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ContentControls in Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Format RichText Content Control using Word VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Programatically Format part of Text"/><title type='text'>How to Format Part of Content Controls in Word VBA</title><content type='html'>Word VBA - Format Some portion of Rich Text Content Control Programatically&lt;br /&gt;
&lt;br /&gt;
ContentControls have become ubiquitous with Word documents nowadays. Rich Text Content Control is used by many developers and authors to represent useful information. &lt;br /&gt;
&lt;br /&gt;
At times there is a necessity to highlight / format some part of the Text in that control. You can either &lt;a href=&quot;http://vbadud.blogspot.in/2012/01/how-to-search-and-highlighttag-string.html&quot;&gt;search for the text and highlight it&lt;/a&gt; or Highlight them based on position&lt;br /&gt;
&lt;br /&gt;
The following example&amp;nbsp;shows how to&amp;nbsp;boldface certain portion of&amp;nbsp;ContentControl&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub FormatContentControl()

Dim oCC As ContentControl
Dim oCCRange As Range
Dim oCCRngFormat As Range
Dim oChr As Range

Set oCC = ActiveDocument.ContentControls(1)
oCC.Type = wdContentControlRichText
Set oCCRange = oCC.Range
Set oCCRngFormat = oCCRange.Duplicate

oCC.LockContentControl = False
oCC.LockContents = False

oCCRngFormat.Start = 20
oCCRngFormat.End = oCCRange.End

For Each oChr In oCCRngFormat.Characters
    oChr.Font.Bold = True
Next oChr

oCCRngFormat.Font.Bold = -1
oCCRngFormat.Font.Underline = WdUnderline.wdUnderlineSingle

oCCRngFormat.Start = oCCRange.End
oCCRngFormat.Font.Bold = 0
oCCRngFormat.Font.Underline = WdUnderline.wdUnderlineNone


End Sub
&lt;/pre&gt;&lt;br /&gt;
See also&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2010/07/how-to-retrieve-value-from-content.html&quot;&gt;How to retrieve value from Content Controls using Word VBA&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://vbadud.blogspot.in/2010/07/how-to-add-content-controls-using-vba.html&quot;&gt;How to add Content Controls using VBA&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4931628925923960164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-format-part-of-content-controls.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4931628925923960164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4931628925923960164'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-format-part-of-content-controls.html' title='How to Format Part of Content Controls in Word VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-1861152064967008061</id><published>2012-01-29T08:03:00.000-08:00</published><updated>2012-01-29T08:03:43.146-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Find Strings"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Highlight Strings"/><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Highlight Text"/><title type='text'>How to Search and Highlight/Tag a string in Word VBA</title><content type='html'>How to Search Content for Specific String/Text using Word VBA&lt;br /&gt;
&lt;br /&gt;
This action is performed often by programmers - there are couple of ways to do &lt;br /&gt;
&lt;br /&gt;
1. Selection.Find&lt;br /&gt;
2. Content.Find&lt;br /&gt;
&lt;br /&gt;
We will have a look at how to search a string, highlight the string and tag the same using Word VBA. This needs document to be open &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Sub Highlight_Tag_Found_Word()

Dim sFindText As String

sFindText = &quot;Olympics&quot;

Selection.ClearFormatting

Selection.HomeKey wdStory, wdMove

Selection.Find.ClearFormatting

Selection.Find.Execute sFindText

 

Do Until Selection.Find.Found = False

        Selection.Range.HighlightColorIndex = wdPink
        
        Selection.InsertBefore &quot;&amp;lt; FoundWord &amp;gt;&quot;
        
        Selection.InsertAfter &amp;lt; /FoundWord &amp;gt;
        
        Selection.MoveRight
        
        Selection.Find.Execute

Loop

 

End Sub

&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/1861152064967008061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-search-and-highlighttag-string.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/1861152064967008061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/1861152064967008061'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-search-and-highlighttag-string.html' title='How to Search and Highlight/Tag a string in Word VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-931236361770751924</id><published>2012-01-21T08:01:00.000-08:00</published><updated>2012-01-21T08:01:56.524-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Add Legends to Chart using Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="ChartWizard in Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Chartwizard method in Excel VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="Creating Excel TrendLine Chart using Excel VBA"/><title type='text'>How to create a Trendline Chart using Excel VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red;&quot;&gt;Excel VBA - Trendline Charts&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
Here are some snippets useful to create a TrendLine Chart in Excel&lt;br /&gt;
&lt;br /&gt;
Have used the entire data from the given sheet to create the chart. Have used the UsedRange function to get that.&lt;br /&gt;
&lt;br /&gt;
If you want to have a specified range you can pass that also&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Sub Create_TrendLine_Chart_Excel_2003(ByRef oRep As Worksheet, ByVal iLeft As Double, ByVal iTop As Double, ByVal sChartTitle As String, ByRef oSource As Range)&lt;br /&gt;
Dim oChts As ChartObjects&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;* Chart Object Collection&lt;br /&gt;
Dim oCht As ChartObject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;* Chart Object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;On Error GoTo Err_Chart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oChts = oRep.ChartObjects&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCht = oChts.Add(iLeft, iTop, 400, 450)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.SetSourceData oSource, PlotBy:=xlColumns&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartType = xlLineMarkers&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartTitle.Text = sChartTitle&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Legend.Position = xlLegendPositionRight&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlCategory) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).AxisTitle.Characters.Text = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlValue) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlValue, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue, xlPrimary).AxisTitle.Text = &quot;Percentage Done&quot; &#39;.Axes(Type:=XlAxisType.xlValue).AxisTitle.Text = &quot;% Done&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue).MaximumScale = 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlCategory).TickLabelSpacing = 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlCategory).TickLabels.Font.Size = 8&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;oCht.Chart.SetElement (msoElementPrimaryCategoryGridLinesMajor)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not oCht Is Nothing Then Set oCht = Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not oChts Is Nothing Then Set oChts = Nothing&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Err_Chart:&lt;br /&gt;
If Err &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Assert Err = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Print Err.Description&lt;br /&gt;
&amp;nbsp;&amp;nbsp; If Err.Number = 94 Then&amp;nbsp; &#39;Invalid Use of Null Error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
End If&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For some reason the above was creating a problem in Excel 2007 and above. Hence created a separate snippet for it&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Sub Create_TrendLine_Chart_Excel_2007(ByRef oRep As Worksheet, ByVal iLeft As Double, ByVal iTop As Double, ByVal sChartTitle As String)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Dim oChts As ChartObjects&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;* Chart Object Collection&lt;br /&gt;
Dim oCht As ChartObject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;* Chart Object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;On Error GoTo Err_Chart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oChts = oRep.ChartObjects&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oCht = oChts.Add(iLeft, iTop, 400, 450)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartWizard Source:=oRep.UsedRange&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartType = xlLineMarkers&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.ChartTitle.Text = sChartTitle&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Legend.Position = xlLegendPositionRight&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlCategory) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlCategory, xlPrimary).AxisTitle.Characters.Text = &quot;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.HasAxis(XlAxisType.xlValue) = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(XlAxisType.xlValue, xlPrimary).HasTitle = True&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue, xlPrimary).AxisTitle.Text = &quot;Percentage Done&quot; &#39;.Axes(Type:=XlAxisType.xlValue).AxisTitle.Text = &quot;% Done&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue).MaximumScale = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &#39;oCht.Chart.SetElement (msoElementPrimaryCategoryGridLinesMajor)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;Err_Chart:&lt;br /&gt;
If Err &amp;lt;&amp;gt; 0 Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Assert Err = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Debug.Print Err.Description&lt;br /&gt;
&amp;nbsp;&amp;nbsp; If Err.Number = 94 Then&amp;nbsp; &#39;Invalid Use of Null Error&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resume Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
End If&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;End Sub&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: orange;&quot;&gt;ChartType = xlLineMarkers&lt;/span&gt; makes this Chart a &lt;strong&gt;TrendLine&lt;/strong&gt;. You can try your luck by selecting other types</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/931236361770751924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-create-trendline-chart-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/931236361770751924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/931236361770751924'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2012/01/how-to-create-trendline-chart-using.html' title='How to create a Trendline Chart using Excel VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-4170932246706792565</id><published>2011-11-06T03:34:00.000-08:00</published><updated>2011-11-06T03:34:49.491-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Custom Properties Extraction"/><category scheme="http://www.blogger.com/atom/ns#" term="VBA Extract Properties"/><title type='text'>How to Extract Properties from Excel/Word without Opening File using VBA</title><content type='html'>&lt;strong&gt;&lt;span style=&quot;color: red; font-size: large;&quot;&gt;How to get CustomProperties from Excel Workbook/Word Document (VBA) without physically opening the file&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are many cases where we need to get the document property without the file being opened in VBA. &lt;br /&gt;
&lt;br /&gt;
This can be achieved by using the objects available in DSOFile.dll. This file can be downloaded from &lt;a href=&quot;http://support.microsoft.com/kb/224351&quot;&gt;http://support.microsoft.com/kb/224351&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Once this downloaded and installed. You need to add a reference to DSO Ole Document&#39;s property library (refer image below)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3lAdTj3NfB3Su6wDf0PE7MyXvUCRkKpH7-5RAbWolavN9lWQcMHVr-UFTNa_Q1VBu0epE0JT1OsqNPRWhL3u9w9b62N6K1QASz8qqhhd8fwSHBZZEiTtIcCCIwpNW6X6pHLEe/s1600/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;542&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3lAdTj3NfB3Su6wDf0PE7MyXvUCRkKpH7-5RAbWolavN9lWQcMHVr-UFTNa_Q1VBu0epE0JT1OsqNPRWhL3u9w9b62N6K1QASz8qqhhd8fwSHBZZEiTtIcCCIwpNW6X6pHLEe/s640/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Function GetPropFromDSO(ByVal sFile As String, ByVal sCP As String) As String

Dim oFil As DSOFile.OleDocumentProperties
Dim oCP As DSOFile.CustomProperties

On Error GoTo Err_Tp
    
    Set oFil = New OleDocumentProperties
    
    oFil.Open sFile, True
    
    Set oCP = oFil.CustomProperties
    GetRevFromDSO = oCP(sCP)
.Value    
    oFil.Close

Err_Tp:
If Err &amp;lt;&amp;gt; 0 Then
    Err.Clear
    Resume Next
End If

End Function
&lt;/pre&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;The function gets the Filename and the Property to be extracted and returns the property value.&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;Here are some important custom properties&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;How to know if a Excel Workbook has Macro without opening it&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;vb&quot; name=&quot;code&quot;&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/4170932246706792565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2011/11/how-to-extract-properties-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4170932246706792565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/4170932246706792565'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2011/11/how-to-extract-properties-from.html' title='How to Extract Properties from Excel/Word without Opening File using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3lAdTj3NfB3Su6wDf0PE7MyXvUCRkKpH7-5RAbWolavN9lWQcMHVr-UFTNa_Q1VBu0epE0JT1OsqNPRWhL3u9w9b62N6K1QASz8qqhhd8fwSHBZZEiTtIcCCIwpNW6X6pHLEe/s72-c/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-28492262.post-8223059977205586040</id><published>2011-09-06T09:18:00.000-07:00</published><updated>2011-09-06T09:18:46.382-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Populate Userform with Excel Range using VBA"/><category scheme="http://www.blogger.com/atom/ns#" term="VBA Excel ListBox Populate"/><title type='text'>How to link Excel Table to ListBox using VBA</title><content type='html'>&lt;b&gt;Fill a ListBox from Excel Table using VBA / Populate a ListBox from Excel Table using VBA&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let us take a Excel table as shown below - a list of Top 10 All time hits .&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghtoJx6KAM0Q6mX0KbmatSctUMvaqvLJkH40MbbFlYGVNLwYwyM-0c5jOY_w9ETfR7OTVyxz_9S31w_YXONuEbYR4aYRVAGawfo2tGaii9AsgNPF0kxobAeBZ9Lvzwd72eQALp/s1600/Excel+Table+to+Listbox.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghtoJx6KAM0Q6mX0KbmatSctUMvaqvLJkH40MbbFlYGVNLwYwyM-0c5jOY_w9ETfR7OTVyxz_9S31w_YXONuEbYR4aYRVAGawfo2tGaii9AsgNPF0kxobAeBZ9Lvzwd72eQALp/s640/Excel+Table+to+Listbox.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Let us assume that we need to populate the Listbox with values from Column 2&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp9St6NtRr5yXkSYR14CVN8M93yu2vtB10sAVPtSDjyM0k8Vdks_z3PzclPfUAM1DtJM4_UtglPt3OqubpE0a2tNXykIFbAErfeL6blgN-jXOy6kRa6qTvNJZIy3jGe_6fJ7aI/s1600/Excel+Table+to+Listbox+2.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp9St6NtRr5yXkSYR14CVN8M93yu2vtB10sAVPtSDjyM0k8Vdks_z3PzclPfUAM1DtJM4_UtglPt3OqubpE0a2tNXykIFbAErfeL6blgN-jXOy6kRa6qTvNJZIy3jGe_6fJ7aI/s400/Excel+Table+to+Listbox+2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The following code will help you populate the data&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;vb&quot; name=&quot;code&quot;&gt;Dim oWS As Worksheet
    Set oWS = ThisWorkbook.Sheets(3)
    Me.ListBox1.List = oWS.ListObjects(1).ListColumns(&quot;Title&quot;).DataBodyRange.Value
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-sESqsY8298yDFuJ2yt8pPA1NBLlQT3e0JzTHRzshJ7Nyjtvk4QPzAeTUocipFeCu1qEv-71WXMQBFWbl5B2Xwlc9C3xdgourjMN7XMvdXzEmT3eOBivJdk8o8A4f-MyQuzMb/s1600/Excel+Table+to+Listbox+3.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-sESqsY8298yDFuJ2yt8pPA1NBLlQT3e0JzTHRzshJ7Nyjtvk4QPzAeTUocipFeCu1qEv-71WXMQBFWbl5B2Xwlc9C3xdgourjMN7XMvdXzEmT3eOBivJdk8o8A4f-MyQuzMb/s400/Excel+Table+to+Listbox+3.png&quot; width=&quot;332&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://vbadud.blogspot.com/feeds/8223059977205586040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://vbadud.blogspot.com/2011/09/how-to-link-excel-table-to-listbox.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8223059977205586040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/28492262/posts/default/8223059977205586040'/><link rel='alternate' type='text/html' href='http://vbadud.blogspot.com/2011/09/how-to-link-excel-table-to-listbox.html' title='How to link Excel Table to ListBox using VBA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghtoJx6KAM0Q6mX0KbmatSctUMvaqvLJkH40MbbFlYGVNLwYwyM-0c5jOY_w9ETfR7OTVyxz_9S31w_YXONuEbYR4aYRVAGawfo2tGaii9AsgNPF0kxobAeBZ9Lvzwd72eQALp/s72-c/Excel+Table+to+Listbox.png" height="72" width="72"/><thr:total>0</thr:total></entry></feed>