<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" 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" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;DEQBQH46eSp7ImA9WhBaEks.&quot;"><id>tag:blogger.com,1999:blog-28492262</id><updated>2013-05-22T16:45:51.011-07:00</updated><category term="Autotagging using Word VBA" /><category term="VBA Format Images" /><category term="Excel VBA 1004 -- The file could not be accessed" /><category term="Windows Directory using VBA" /><category term="Modifying File Atrributes" /><category term="Turn the Image Upside Down" /><category term="Extract Macro Names from Workbook" /><category term="Tables to PDF using VBA" /><category term="Extract Keywords" /><category term="Height of Row using Excel VBA" /><category term="How to unistall Excel/Word addins using Visual Studio" /><category term="Print Multiple Sheets using VBA" /><category term="VBA Comments" /><category term="VBA Excel Comment Automation" /><category term="Update Access 2007 table using ADO" /><category term="Outlook VBA Explorers collection" /><category term="Document Styles using Word VBA" /><category term="Excel VBA ShowTotals Method" /><category term="Chartwizard method in Excel VBA" /><category term="AutomationSecurity" /><category term="Setting Tool tip through Code" /><category term="DeleteMenu WinAPI Function" /><category term="Remove Autofilter using VBA" /><category term="Get Variable Type" /><category term="VBProject" /><category term="Excel Events Disable" /><category term="Microsoft Jet and Replication objects" /><category term="Export Powerpoint Slide to Image using VBA" /><category term="Array Filter" /><category term="Show All Comments in Excel VBA" /><category term="Check state of protection of VBProject" /><category term="How to add macro to workbook using VBA" /><category term="Visual Basic CommonDialog" /><category term="Display Unique Rows using Advanced Filter Excel VBA" /><category term="VBA ThisWorkbook.VBProject" /><category term="Creating Presentation using VBA" /><category term="VBA Extract Excel Comments using VBA" /><category term="VBA Read Text Files" /><category term="insert field in 2010" /><category term="vbDirectory" /><category term="Shape Attributes through Word VBA" /><category term="Update non-contiguous ranges using VBA" /><category term="Excel-Outlook" /><category term="Error in Excel formula" /><category term="Word VBA Find Strings" /><category term="Display ToolTipText in CommandBar Controls" /><category term="Create New Command Bar" /><category term="No of processors using VBA" /><category term="Check Presence of AutoFilter in a Sheet using VBA" /><category term="Outlook VBA Extract Subject of Mails" /><category term="SaveAs Option with Password in Powerpoint VBA" /><category term="VBA Attach Module" /><category term="VBA" /><category term="Set Chart Title programatticaly using Excel VBA" /><category term="VarType" /><category term="VBA Temporary Folder Path" /><category term="MSHFlexGrid" /><category term="Excel VBA SpecialCells Numerals in Formula Results" /><category term="Ppwerpoint to image conversion using VBA" /><category term="Extract  external links using VBA" /><category term="Excel Cell Rotation" /><category term="VBA to create database on the fly" /><category term="VSTO Addin Functions in VBA" /><category term="Show Open Dialog Box" /><category term="Word VBA Highlight Strings" /><category term="Optional Parameters" /><category term="Scaling of Pictures / Images using VBA" /><category term="VBA Get User Name" /><category term="GetSaveAsFilename Method" /><category term="Outlook VBA GetDefaultFolder  MEthod" /><category term="VBA recursive deep directory search" /><category term="VBA Command Bars" /><category term="Delete Comments using VBA" /><category term="Merging Files using VBA" /><category term="Increase Speed of Macros" /><category term="Optimize VBA Code" /><category term="1004 Microsoft Office Excel cannot access the file" /><category term="Formatting Cells Programmatically using VBA" /><category term="Create Folder VBA" /><category term="MSFlexGrid" /><category term="Using Help" /><category term="Rebind keys using VBA" /><category term="InputBox method" /><category term="Word VBA convert character codes to Unicode character" /><category term="VBA Position of Images" /><category term="VBA Controls.Add" /><category term="Excel VBA References property" /><category term="Temporary Folder Visual Basic Code" /><category term="Excel Formula recalculation" /><category term="Excel VBA WebOptions" /><category term="Option Compare Text. VBA Case Insensitive Cpmparison" /><category term="msoFlipVertical" /><category term="Compare Files by Date" /><category term="VBA Extract Properties" /><category term="Events in VBA" /><category term="Excel VBA Saved property" /><category term="Programming OLEOBjects in VBA to embed Word Document" /><category term="VBA Event procedures" /><category term="Excel VBA FileSearch property" /><category term="Filtering Range using Excel VBA" /><category term="PlaySound API Function" /><category term="MAPI Namespace in Outlook VBA" /><category term="Remove Comments using VBA" /><category term="WorksheetFunction Example" /><category term="Application.Wait as Sleep in VBA" /><category term="Office 2007 show developer tab" /><category term="Visual Basic Keydown event" /><category term="VBA Code to transfer the array contents to Excel" /><category term="How to stream a text file to speaker using VBA" /><category term="Outlook VBA ExchangeStoreType" /><category term="Outlook VBA Subject property" /><category term="Disable command bars and controls" /><category term="Excel VBA Right Click Menu item creation" /><category term="Excel formula calculation error" /><category term="ShutDown Windows using VBA" /><category term="Word VBA Synonyms" /><category term="EDATE WorksheetFunction" /><category term="Check if Range is Filtered using VBA" /><category term="AutoFilter using Excel VBA" /><category term="Excel to Word using VBA" /><category term="Hide All Comments in Excel VBA" /><category term="Write to Text File" /><category term="Application.Speech VBA" /><category term="InStrRev Function in VBA" /><category term="VSTO Array to Range" /><category term="How to Make a file ReadOnly" /><category term="Read files using VBA Read Configuration Files using VBA" /><category term="Application.GoTo" /><category term="ADOX Catalog" /><category term="Collection of objects using Excel VBA" /><category term="Word VBA Insert Symbols" /><category term="Search Text in Google using Excel VBA" /><category term="VBA identify if program is in debug mode" /><category term="Check if Date within Range" /><category term="VBA Function to return more than one value" /><category term="Early Binding" /><category term="Get OS Version using VBA" /><category term="Disable Right Click Menu" /><category term="Create Slides using VBA" /><category term="Get Domain Name" /><category term="ADO Insert SQL Query" /><category term="External table is not in the expected format - Excel ADO VBA" /><category term="Get Sub Directories using  VBA Dir Function" /><category term="Windows API Functions" /><category term="Adding Images to Header using Word VBA" /><category term="Insert Values for Multiple Cells using Excel VSTO" /><category term="VBA TotalsRowRange" /><category term="GetTempPath" /><category term="Get Temp Folder" /><category term="Automate TextBox" /><category term="Update Access 2007 table using VBA" /><category term="Document Creation Time in VBA" /><category term="Populate Userform with Excel Range using VBA" /><category term="Executing Excel VBA procedures" /><category term="Excel VBA CodeModule" /><category term="MAcro for Creating PivotTable" /><category term="ADODB in Excel" /><category term="Automate Outlook" /><category term="Connection String CSV File ADO" /><category term="Formatting Report" /><category term="Add Combo Box using Word VBA" /><category term="Show Pivot Table Field List" /><category term="Add command button to worksheet using VBA" /><category term="Excel VBA FindFormat" /><category term="Aligning Text Output" /><category term="Action on message box responses" /><category term="How to determine the source of Pivot Table using VBA" /><category term="Windows API  Process32First" /><category term="Lotus Notes Mail Automation" /><category term="Get Sub Directories using  VBA FileSystemObject Function" /><category term="Terminate Word Process using VBA" /><category term="Word VBA Print Setup Dialog" /><category term="Add Ole Control to Word Document" /><category term="VBA Function to Logoff" /><category term="Convert Decimal to Percent using VBA" /><category term="Identify the last-modified or latest file using Excel VBA" /><category term="VSTO Excel Autofit Columns" /><category term="Update all Field Codes in Word Document" /><category term="Code Validate Date" /><category term="Copy Comments to Range using Excel VBA" /><category term="VBS Convert to Percent" /><category term="Time Function" /><category term="Excel VBA Application.CellDragAndDrop" /><category term="VBA Filler Function" /><category term="Change Text in Textboxes using word VBA" /><category term="Excel VBA Select named range" /><category term="ActiveVBProject property" /><category term="ADO to update database" /><category term="VBA DateDiff" /><category term="Excel VBA NumberFormat" /><category term="Switch off Track Revisions using Word VBA" /><category term="Maximum No of Rows in Excel 2007" /><category term="Excel Macros Speedup" /><category term="VBA Open and Repair Workbook" /><category term="Excel VBA Tag Underlined Text" /><category term="Special Folders" /><category term="Open and Repair Excel Workbook using VBA" /><category term="Userdefined Function in Excel VBA" /><category term="Select Webpage using VBA" /><category term="VBA sleep function" /><category term="VSTO" /><category term="VBA Arrays" /><category term="ADO Text File Connection String" /><category term="VBA Find Method Example" /><category term="Convert Word Symbols to Entities using Visual Basic" /><category term="Word VBA for InlineShapes" /><category term="VBA Last save time" /><category term="VBA Temporary Folder" /><category term="Alter Security settings in workbook through VBA" /><category term="Running Extrernal Application used VBA" /><category term="Powerpoint VBA SaveAs Argument Password Option" /><category term="Dir$ Function Example" /><category term="ScreenUpdating" /><category term="ADO" /><category term="Menu" /><category term="SQL Server 2005 Express VBA" /><category term="Identify Error Cells in a Sheet using Excel VBA" /><category term="Application.IsTrusted in Outlook VBA" /><category term="Add Total Row to Excel Table using VBA" /><category term="vba code to Hide and unhide Worksheet" /><category term="Arrays in AutoFilter Excel VBA" /><category term="VBA Insert SQL Query" /><category term="Word insert Properties using Field Codes" /><category term="VBA Copyfolder" /><category term="Find End Of Document using Word VBA" /><category term="Excel CommandBarControl VBA" /><category term="VBA Modify Non-continuous ranges" /><category term="Remove End Punctutations from List Items using VBA" /><category term="AddOLEControl Command Buttons" /><category term="No of days in a month using Excel VBA" /><category term="enable popup menu" /><category term="VBA FreeFile" /><category term="VBA Extract Keywords" /><category term="Excel VBA Conditional Formatting" /><category term="Text Files as Datasource" /><category term="Programmatically add macros to workbook" /><category term="Excel VBA OleObjects" /><category term="Document Comments using VBA" /><category term="VBA Tool Tip Text" /><category term="Automatic to Manual Hyphens using Word VBA" /><category term="EnableMenuItem WinAPI Function VB EXample" /><category term="Word VBA 5101 - This bookmark does not exist error" /><category term="Run-time error '1004': Add method of addins class failed" /><category term="Disable AutoRecovery using Word VBA" /><category term="Create ReadOnly Files" /><category term="Word VBA How to prevent spelling errors in Word Document" /><category term="Enable or Disable dragging and dropping cells in Excel" /><category term="Macro to Update File Properties" /><category term="How to check if Pivot Table is external" /><category term="VBA ASC Function" /><category term="Excel VBA breaking links" /><category term="ChartWizard in Excel VBA" /><category term="Open XML File in Excel" /><category term="Disable Close Button" /><category term="EXcel VBA Sheet Protection" /><category term="Excel VBA Uninstall Addins" /><category term="Extract Color Range using Excel VBA" /><category term="Word VBA Check if Selection is within Table" /><category term="FileSystemObject folderexists" /><category term="Excel VBA Replace Function" /><category term="VBA Show processes in Task Manager" /><category term="Windows API Get Screen Height" /><category term="WeekDay Excel VBA" /><category term="How to digitally sign a VBA Project" /><category term="Check if Code is Trusted Outlook VBA" /><category term="Excel VBA Application.FindFormat" /><category term="Check Existence of Book mark" /><category term="Scroll Window using Excel VBA" /><category term="VBA Mail automation" /><category term="Validate User Value for Comboboxes in Word VBA" /><category term="Excel VBA Tips" /><category term="How to make single instance VB Application" /><category term="Show Excel Status Bar" /><category term="IsMissing Function" /><category term="Using Excel Functions in VBA" /><category term="Outlook VBA PropertyAccessor" /><category term="Microsoft HTML Object Library in VBA" /><category term="Validate Date" /><category term="Copying Files VBA" /><category term="Comments.Add in Excel VBA" /><category term="Excel Tables and its advantages" /><category term="Retrieve TextBox Content from Powerpoint VBA" /><category term="Install Word Addins using VBA" /><category term="Undo changes programmatically using VBA" /><category term="Add Argument Descriptions to Excel UDFs" /><category term="Listobjects DataBodyRange using VBA" /><category term="Case in-sensitive comparison" /><category term="Run a Macro with arguments from Different Workbook" /><category term="MoveFile  Example" /><category term="Visual Basic ReDim statement" /><category term="Excel VBA Create Pivot Table using Wizard" /><category term="Rtf to Word" /><category term="VB GetAttr Function" /><category term="VBA Tag Macro to an Image" /><category term="VBA Select a Folder" /><category term="Change Caption of Command Button using Word VBA" /><category term="Visual Basic Get Screen Area" /><category term="Excel VBA Find Matches Array" /><category term="Excel Sheet Comments to Range" /><category term="Automating Excel from Asp.Net" /><category term="Add Text Box to Slide" /><category term="Word VBA AddOLEControl" /><category term="ADO Errors" /><category term="Execute Macro in All Files" /><category term="Aligning Text File" /><category term="Outlook VBA GetNameSpace method" /><category term="Find the no of Working days in a year using VBA" /><category term="EXcel VBA Protect Sheet" /><category term="Word VBA Get Author Names" /><category term="Document Parts in Word VBA" /><category term="Content Controls in VBA" /><category term="VBA Delete Folder" /><category term="Creating Digital Signature for VBA Project" /><category term="VBA Disable shortcuts" /><category term="Shortcut for MArking indexes using VBA" /><category term="Print Multiple Ranges" /><category term="Macro to extract editable ranges" /><category term="Word VBA Check if Cursor is within Table" /><category term="Dynamic Creation of Function / Procedure in BAS/Class Module" /><category term="Login to Website using Excel VBA" /><category term="VBA Application.Filesearch" /><category term="DocProperty Field in Word VBA" /><category term="Save Chart as Jpeg files using VBA" /><category term="Visual Basic Code Optimization" /><category term="VBA code to find underlined text" /><category term="Word VBA SynonymInfo" /><category term="Add AutoCorrect  Entries for Word using VBA" /><category term="Wait method in VBA" /><category term="Show Dialog" /><category term="Excel VBA Transpose" /><category term="Asp.Net Office Applications" /><category term="GetExitCodeProcess API Function" /><category term="Excel VBA VBComponents" /><category term="File Size - VBA Function" /><category term="Automate Lotus Notes" /><category term="Read Text files using FileSystemObject" /><category term="VBA Tips and Tricks" /><category term="VBA scheduling functions" /><category term="Insert data through SQL to Accdb" /><category term="Extract Underlined Range using Excel VBA" /><category term="Paste Formatted Text from Word to Outlook using VBA" /><category term="Open Specific Folder using Visual Basic" /><category term="Excel VBA ADO for Text Files" /><category term="Multiple Return Parameters in Visual Basic" /><category term="Convert document to PDF using VBA" /><category term="OpenProcess  API Function" /><category term="VBA Send File to Recycle Bin" /><category term="Create a Pivot Table from Existing Pivot Cache" /><category term="read-only attributes" /><category term="VBA Disabling Close Button" /><category term="Disable Maximize button using VBA" /><category term="Visual Basic Choose Function" /><category term="Check Application Instances" /><category term="How to Load Analysis ToolPak in Excel 2007" /><category term="Convert Webaddress or email as Hyperlinks" /><category term="How to create an event in VBA" /><category term="Automate Powerpoint" /><category term="open all Excel Workbooks under a particular directory" /><category term="Excel VBA add OLEObject object" /><category term="VBA Drag and DRop Files to Text Box" /><category term="VB6 GetObject" /><category term="Check broken reference using VBA" /><category term="Edit Embedded Objects using Word VBA" /><category term="Excel VBA Convert Dates into Arrays" /><category term="Highlight Editable ranges using VBA" /><category term="RemoveMenu  Win API Function" /><category term="Excel Print Multiple Sheets" /><category term="Convert Drive Name to Sharename using VBA" /><category term="Hide / Unhide Sheet Tab using Excel VBA" /><category term="VBA Dir Function" /><category term="Excel Shapes" /><category term="Disable Developer Tab in Office 2010" /><category term="Compare Formatting Changes in Word Document using VBA" /><category term="VBA Find All Method Example" /><category term="Popup Menu" /><category term="EXcel VBA Check  Procedure Existence. Count the No of MAcros in a Workbook" /><category term="Add TextBoxes to Sheet Programmatically using VBA" /><category term="VBA Get System Processes" /><category term="Download Code File Size" /><category term="Install Word Templates (Addins / .DOT files) using VBA" /><category term="Loop thru Folders" /><category term="Neatly Spaced Text File" /><category term="VBA XCOPY Function" /><category term="VBA HideFieldCodes" /><category term="Powerpoint VBA CommandBarPopup" /><category term="VBA to Select Multiple Sheets" /><category term="Word VBA VerticalResolution" /><category term="Download Code  Latest File" /><category term="Keywords properties" /><category term="Copy Files using VBA" /><category term="How to search embedded Excel using Word VBA" /><category term="Windows API Get Screen Width" /><category term="Word Field Codes" /><category term="How to use collections in Excel VBA" /><category term="VBA CommandBarControl" /><category term="AutoRecovery using Word VBA. VBA Auto Recovery" /><category term="VBA Choose Function" /><category term="Convert Text to Hyperlinks using VBA" /><category term="ADO connection Events in VBA" /><category term="Add a new menu item to the Tools menu" /><category term="Excel VBA Shortcuts" /><category term="Excel VBA  PivotTable" /><category term="Insert Macro to a Module Using VBComponents" /><category term="Word 2010" /><category term="Disable Cut and Copy from Popup menu" /><category term="Categorize Excel UDFs" /><category term="NetworkDays Worksheet Function" /><category term="Unhide Columns using Excel VBA" /><category term="Word VBA AutoFormatReplaceHyperlinks  Automatically Format Hyperlinks" /><category term="Common Dialog Example VB" /><category term="Visual BAsic Filler Function" /><category term="Chart to Image Conversion using VBA" /><category term="InStr Function" /><category term="Set the Project Name of VBA project programmatically" /><category term="Get the Shared Name of a drive" /><category term="Hide / Unhide Worksheets using Excel VBA (Excel 2007)" /><category term="USER DOMAIN using VBA" /><category term="Excel VBA IsDirty Function" /><category term="Excel WorkDay Function" /><category term="VBA Msgbox" /><category term="DDE or OLE Automation in Excel VBA" /><category term="Microsoft Outlook Mail Automation" /><category term="Adding Controls using Powerpoint VBA" /><category term="Select a Named Range using Excel VBA" /><category term="Save Selected Range as RTF using VBA" /><category term="VBA FileLen Function" /><category term="Word VBA HorizontalResolution" /><category term="Word VBA Expand Ranges" /><category term="Maximum Characters In a cell in Excel 2007/2010" /><category term="Export Excel Chart to Image using VBA" /><category term="AutoCorrect feature using VBA" /><category term="How to disable keys using VBA" /><category term="VBA Timer function" /><category term="ListFormat in Word VBA" /><category term="VBA System Resolution" /><category term="Update Access AutoNumber Field using VBA" /><category term="Visual Basic Array Filters" /><category term="Adding Menu Items" /><category term="TemporaryFolder" /><category term="Clone Document in Word VBA" /><category term="Add Command to Tools menu" /><category term="Convert Decimal to Percentage using VBA" /><category term="Copy Array to Excel Range usiong VSTO" /><category term="VBScript  Lock Computer" /><category term="Disable Macros using VBA" /><category term="Dates as array in VBA" /><category term="GetSystemMenu  Win API Function" /><category term="Object required 424 error" /><category term="How to call a VSTO Addin Function from VBA" /><category term="How to add format condition using Excel VBA" /><category term="Application.OnKey" /><category term="Check valid reference in the registry usingf VBa" /><category term="Kill Excel Process" /><category term="Adding to Popup menu" /><category term="ShowPivotTableFieldList Property in Excel VBA" /><category term="Exploded Pie Chart using Excel VBA" /><category term="VBA Update File Properties" /><category term="Convert Text to Array in Excel VBA" /><category term="Word VBA Hide Field Codes" /><category term="VBA Excel ListBox Populate" /><category term="Sort Files By Date using Excel VBA" /><category term="Uninstall Excel Addins using VBA" /><category term="VBA Delete Module" /><category term="VBA CommandBars" /><category term="Compress Pictures/Images in Excel using VBA" /><category term="late binding" /><category term="disable popup menu" /><category term="Check Word Instance VBA" /><category term="Excel VBA check VBE mode" /><category term="Timer Control" /><category term="LinkedTextBoxes in VBA" /><category term="Unhide Rows using VBA" /><category term="SaveCopyAs" /><category term="Link Application Help with Program" /><category term="Excel as database for Query Table" /><category term="Word VBA Export Range to New Document" /><category term="VBA Insert  Degrees Symbol" /><category term="Visual Basic" /><category term="Check Presence of AutoFilter in a Sheet PRogramatically" /><category term="Right Click Menu" /><category term="Kill Statement" /><category term="Evaluate Method" /><category term="Millisecond timer using VBA" /><category term="ActiveWorkbook.Breaklink" /><category term="Excel VBA Advanced Filter" /><category term="How to Configure Source Data of Pivot Table using VBA" /><category term="Calculate the End Date using Formula / VBA" /><category term="VBA RmDir  Method" /><category term="QueryDosDeviceW API Function" /><category term="TextBox Drag and Drop" /><category term="Excel VBA Mail" /><category term="Application.SaveWorkspace VBA" /><category term="Excel VBA ListObjects" /><category term="Add Legends to Chart using Excel VBA" /><category term="Multiple Return Parameters in VBA" /><category term="XML in Excel" /><category term="Command Bars in Excel" /><category term="Word VBA avoid Spell check dialog" /><category term="Protect Sheet using VBA" /><category term="Opening File using Common Dialog" /><category term="xlDialogSheet" /><category term="Programmatically update Database tables" /><category term="Excel VBA WorksheetFunction Transpose Function" /><category term="Check Directory Existence" /><category term="Set Word Options using VBA" /><category term="Outlook VBA Templates" /><category term="Compact MS Access Database using ADO" /><category term="How to make VB Application a Single Instance one" /><category term="Device Name" /><category term="Choose Function" /><category term="VBA Number of pages" /><category term="Text Box vbCRLf" /><category term="Use VB Application in VBA" /><category term="Sleep Function in Excel VBA" /><category term="VBA Create Popup menu" /><category term="FileCopy  Example" /><category term="Save All Open Workbooks using VBA" /><category term="How to prevent Content controls being deleted" /><category term="XML and VBA" /><category term="dynamic updation of Excel" /><category term="Excel 2010" /><category term="Extract Excel Properties" /><category term="Run Macro on Image Click" /><category term="Excel VBA Tag Italic Text" /><category term="Run a Macro from Different Workbook" /><category term="Excel VBA" /><category term="VBA Compare Documents" /><category term="Formatting Text Files" /><category term="ADO Connection string for Text File" /><category term="Minor and Major Operating System versions using VBA" /><category term="Excel VBA Applying Multiple Criteria in AutoFilter" /><category term="Filter Array Content" /><category term="File Handling Functions" /><category term="Launch PRogram from command" /><category term="Excel VBA AddFromFile" /><category term="Format Excel Cells using VBA" /><category term="Delete the entire folder using VBA" /><category term="Accessi" /><category term="Retrieve images of the Word document using VBA / Extract images in Word document into separate files using VBA" /><category term="Set Default no of Worksheets using Excel VBA" /><category term="Install Analysis ToolPak in Excel 2007" /><category term="VBA Get ASCII Value of an Character" /><category term="Copying Folders VBA" /><category term="SHFileOperation WinAPI Function" /><category term="Shared Name For the Drive" /><category term="Check if the Workbook is Read-Only" /><category term="Customizing VBA Project  properties" /><category term="Get Running Processes" /><category term="VBA code to No of Working days in a Year" /><category term="How to ignore AutoNumber field in VBA ADO" /><category term="Excel VBA Custom Properties Extraction" /><category term="Word to PDF using VBA" /><category term="Word Add-ins using VBA" /><category term="Excel VBA copy text to Word document" /><category term="Automatically create Hyperlinks for all URLs in a document" /><category term="VB File Exists" /><category term="VBA AddOLEControl Method" /><category term="Add AutoCorrect  Entries for Excel using VBA" /><category term="Send Multiple eMail" /><category term="How to enable Additional Controls in Tools menu - VBA" /><category term="Rset" /><category term="Kill Task using VBA" /><category term="Sort Table Columns using Word VBA" /><category term="Application.StatusBar" /><category term="Adding Command Button to Popup" /><category term="Connection String for Excel Database" /><category term="Fill Spaces VBA" /><category term="VBA Filter Function" /><category term="ADO control events using VBA" /><category term="Computer Name VB Function" /><category term="Copy matching data automatically through excel VBA" /><category term="VBA Saving Powerpoint" /><category term="Excel VBA SpecialCells Excel cell that contains formula couple" /><category term="Assigning Keyboard shortcuts through VBA" /><category term="Word Modeless Userform in VBA" /><category term="Delete Command Bar" /><category term="Outlook VBA IsTrusted" /><category term="Delete Word Temp Files VBA" /><category term="Adding Pictures to Header using Word VBA" /><category term="Microsoft Scripting Runtime" /><category term="PPT to PDF using VBA" /><category term="Query Table with Excel as Data Source" /><category term="VBA Lock Computer" /><category term="RTF to PDF using VBA" /><category term="Copying folders in VBA using File System Object" /><category term="Automate Workbook Save" /><category term="FileSystemObject's ShareName" /><category term="Getobject Internet Explorer in VBA" /><category term="Visual Basic Dir Function" /><category term="Outlook VBA GetTable MEthod" /><category term="Get File Attributes - GetAttr" /><category term="check visibility of VBE code window using VBA" /><category term="Word VBA Hyphenation" /><category term="Check if Value exists Excel VBA" /><category term="Visual Basic Preserve keyword" /><category term="Create Excel VBA ListObjects" /><category term="Filter Webpages using VBA" /><category term="RemoveDocumentInformation Excel 2007 VBA" /><category term="Excel VBA NewSearch method" /><category term="Embed Word Document to Excel Sheet using Excel VBA" /><category term="Replace Contents in Excel automatically" /><category term="Outlook VBA StorageItem object" /><category term="EXCEl VBA AddIns" /><category term="Array.Sort function in Excel VBA. How to sort an Array in VBA. VBA Array Sort Function" /><category term="Track Revisions using VBA" /><category term="ListColumns in Excel VBA" /><category term="Convert Comments to Range Text using VBA" /><category term="Excel Addins using VBA" /><category term="File not closed error in VBA" /><category term="Create Access database using VBA" /><category term="PivotTableWizard method in Excel VBA" /><category term="Word VBA Highlight Text" /><category term="VBA Speaker output" /><category term="Add ToolTipText in CommandBar" /><category term="Deletion of Images" /><category term="Program Word Document in Excel Sheet" /><category term="Visual Basic ToolTipText" /><category term="Format RichText Content Control using Word VBA" /><category term="Embed Existing Word File to Spreadsheet using Excel VBA" /><category term="Scaling of Pictures / Images using Word VBA" /><category term="Excel VBA add  ActiveX control" /><category term="Word VBA Run method" /><category term="Import RTF file to Activedocument" /><category term="Tag List Items in Word VBA" /><category term="Calculate Workdays - Excel VBA" /><category term="display the embedded document as an Icon using VBA" /><category term="Programatically Format part of Text" /><category term="Create Menu using VBA" /><category term="Excel VBA HasFormula" /><category term="Calculation" /><category term="Check if Instance of Application is Running" /><category term="VBA Email" /><category term="TASKKILL function in VBA" /><category term="Automating Excel File Save" /><category term="Dynamically Create New User Form using VBA" /><category term="Excel VBA undo changes" /><category term="GetVersionEx  VBA" /><category term="enable right click menu" /><category term="Email Domain Separation" /><category term="Name Statement" /><category term="VBA NetworkDays" /><category term="Get File Name using VBA" /><category term="Get the Title property" /><category term="Creating an Excel Add-in" /><category term="Search Webpages using VBA" /><category term="Visual Basic Get Screen Height" /><category term="Run-time Errror 445 Object doesn't support this action in Application.FileSearch" /><category term="Bind Keys using Word VBA" /><category term="Format Excel Columns using VBA" /><category term="AutoSize" /><category term="Delete Temporary Files" /><category term="VBA Host Name" /><category term="Creating Excel TrendLine Chart using Excel VBA" /><category term="VBA ShowFieldCodes" /><category term="Word VBA Bookmarks" /><category term="File Size" /><category term="msgbox responses in VBA" /><category term="Export RichTextBox content as RTF file using VBA" /><category term="Call Method in Addin from Visual Basic Applications" /><category term="Lset" /><category term="Add Comments in Excel VBA" /><category term="Send Mail from Outlook" /><category term="Userform Draw Rectangle" /><category term="VBA and ADO" /><category term="VBA Link Macro to CommandBar" /><category term="Excel VBA Timer" /><category term="CommonDialog VBA" /><category term="Multiline TextBox" /><category term="Enable AutoRecovery using Word VBA" /><category term="Increase Speed of VBA" /><category term="Copy specific data automatically" /><category term="ContentControls in Word VBA" /><category term="GetSystemMetrics" /><category term="VBA Change Pivot Table source data externally" /><category term="AllowEditRanges Excel VBA" /><category term="Browse Folder" /><category term="Add Slides VBA" /><category term="Flip Images" /><category term="How to Check Internet Connection using VBA" /><category term="Convert Used Range to an Excel Table using VBA" /><category term="IsError Function" /><category term="Extract Bold Range using Excel VBA" /><category term="Identify Objects that are linked to Source file using Excel VBA" /><category term="Set frequency of Autorecovery Save using VBA" /><category term="Automate Email" /><category term="Outlook VBA Extract Body content of Mails" /><category term="Outlook VBA" /><category term="Reading Text Files using VBA" /><category term="Calculate End date using VBA" /><category term="Download Code Image Range" /><category term="VBA EntireRow Property" /><category term="Create Database using ADO" /><category term="Add Controls Popup Menu using Powerpoint VBA. Add control to right-click menu using VBA" /><category term="asynchronous Speak" /><category term="Moving Log Files" /><category term="SetAttr Function" /><category term="FindAll Function in Excel VBA" /><category term="Validate Date between Ranges" /><category term="Replace Values of a Column" /><category term="Run-time error '1004': Unable to get the Add property of the AddIns class" /><category term="Excel VBA Delete Duplicate Rows" /><category term="VBA Compare Files by Date" /><category term="Find the Latest File" /><category term="File System Object" /><category term="Uninstall Word Templates (Addins / .DOT files) using VBA" /><category term="Dynamic Addition of command to tools menu. Adding Command Button to Tools" /><category term="VBA Get Active Internet Explorer" /><category term="Identify Out of Office using Outlook VBA" /><category term="ADO DataControl" /><category term="How to get milliseconds in VBA Now() function" /><category term="VBA Confirm Internet Connection" /><category term="Pivot Tables and VBA" /><category term="Run-time Error 55 File already open" /><category term="Disable Close Button using VBA" /><category term="Creating Log Files" /><category term="How to get embedded Word object" /><category term="VBA Insert  Yen Sign" /><category term="GetAttr Function" /><category term="VBA Customize Command Bar" /><category term="Decrease Shapes" /><category term="select a Shell folder" /><category term="Convert Format to Tags using Word VBA" /><category term="Excel VBA format characters within a text string" /><category term="VBA Latest File" /><category term="Make the file Hidden" /><category term="Disable Popup Menu Items" /><category term="Extract Character Styles Word VBA" /><category term="Word VBA RunAutoMacro method" /><category term="Linking Text Box to Excel Range using VBA" /><category term="Add Columns to Excel List Object using VBA" /><category term="Array Function in VBA" /><category term="Hyperlinks in Excel VBA" /><category term="Update Tool Tip Text in Run time" /><category term="Speech to Text using VBA" /><category term="Write Configuration Files using VBA" /><category term="VBA Decimal to Hexadecimal Conversion" /><category term="How to get Free Disk Space using VBA" /><category term="Dialogsheets" /><category term="VBA WeekdayName Function" /><category term="Delete unwanted Word Templates (Addins / .DOT files) using VBA" /><category term="Excel VBA SpecialCells Numerals" /><category term="RemovePeriods Method Powerpoint VBA" /><category term="Write INI files using VBA" /><category term="Use Autofilter in VBA" /><category term="Add Shapes to Headers using Word VBA" /><category term="Find Image Range - Excel" /><category term="VBA Format Cells" /><category term="Excel VBA Path property" /><category term="Open Text File using ADO" /><category term="Extract Italic Range using Excel VBA" /><category term="Word VBA get Track Revision Details" /><category term="VBA use Excel As Database" /><category term="Manipulating Excel Ranges using VBA" /><category term="Calculate Last Day of the Month" /><category term="Share Name" /><category term="Check Folder Existence VBA" /><category term="Delete Images from Spreadsheets" /><category term="Query Table with Text File as Data Source" /><category term="VBA FileSystemObject" /><category term="VBA Delete Files" /><category term="Extract Formula using VBA" /><category term="Connect to Website from Excel VBA" /><category term="Add Content Controls using VBA" /><category term="Reducing Size of Microsoft Access Database" /><category term="VBA Application.Filesearch Error" /><category term="Kill Word Process" /><category term="VBA GetObject" /><category term="Visual Basic Get File Size" /><category term="Choose the Values" /><category term="Insert Procedure to a Module Using VBComponents" /><category term="VBA alter Automation Security" /><category term="Customizing VBA editor using VBA" /><category term="Document Conversion" /><category term="LockWorkStation VBS" /><category term="Could not find installable ISAM" /><category term="Excel ADO" /><category term="Visual Basic Get Computer Name" /><category term="VBA Save Workbook" /><category term="Function keys as Shortcut Keys in VB" /><category term="VBA Open Windows Explorer" /><category term="Unprotect Sheet using VBA" /><category term="Terminate Excel Process using VBA" /><category term="Retrieve Command Line Arguments" /><category term="Extract Cells Containing Numbers alone using Excel VBA" /><category term="Excel Range to JPG using VBa" /><category term="Word Check Compatibility" /><category term="Return Multiple Values – VBA Function" /><category term="Add Word Addins using VBA" /><category term="IsMissing Doesn't Work" /><category term="Show all running processes using WinAPI" /><category term="OnAction Property" /><category term="Match Excel Column a Range" /><category term="Excel VBA Scroll to a Range" /><category term="Server-side automation" /><category term="Visual Basic Open a Folder in Windows Explorer How to Open Explorer Window using VBA" /><category term="Visual Basic Drag and DRop Files to Text Box" /><category term="Adding to Tools menu" /><category term="Excel VBA Application.GoTo" /><category term="Adding Default Chart to a Sheet using Excel VBA" /><category term="Outlook VBA Mailitem" /><category term="Play Audio File using Excel VBA" /><category term="How to Increase / Decrease Size of Pictures in Word Document using VBA" /><category term="Get the LOGON SERVER" /><category term="Word document - get figure width using Word VBA" /><category term="VBA Check File Availability" /><category term="Send Mail from Lotus Notes" /><category term="Get First Row of Excel AutoFilter using VBA" /><category term="Exclude Holidays in Networking days" /><category term="Excel Delete Rows" /><category term="break the links to external source" /><category term="Word Table Sort using VBA" /><category term="Add Control to CommandBar" /><category term="Operating System using VBA" /><category term="Pick the Value from the array" /><category term="Excel VBA Remove Duplicate Rows" /><category term="Edit Linked Objects in VBA" /><category term="Lock and Unlock cells using VBA" /><category term="Access 2007 Insert Data using VBA" /><category term="Limit Text Box Length" /><category term="Delete Temporary Files VBA" /><category term="Characters object" /><category term="How to make VB Exe as a Single Instance one" /><category term="Excel VBA InputBox" /><category term="VBA Opening Text Files" /><category term="Compact MS Access Database using VBA (ADO Code)" /><category term="EXcel VBA LinkSources" /><category term="ADO in Excel" /><category term="Creating a Command Button on Sheet using Excel VBA" /><category term="Create New Module using VBA" /><category term="VBA Filtering Array Content" /><category term="Excel as Database" /><category term="VBA Create Menu" /><category term="Disabling Excel events" /><category term="VB Forms Function keys" /><category term="Get The Name of Drive using VBA" /><category term="Extract Paragraph Styles Word VBA" /><category term="VBA Insert  Plus Minus Symbol" /><category term="Lotus Notes VBA" /><category term="Select value from Array" /><category term="Set Chart postion programatticaly using Excel VBA" /><category term="VBA Windows Folder Path" /><category term="Orientation of CElls" /><category term="Sort Text in Word Table using Word VBA" /><category term="How to clean Office Solution from Visual Studio" /><category term="Visual Basic Command Line Arguments" /><category term="VBA Insert  Multiplication Sign Symbol" /><category term="Excel VBA PivotCache" /><category term="enable Developer Tab in Office 2010" /><category term="Word VBA convert to PDF" /><category term="Word VBA MeaningList" /><category term="Show Print Setup Dialog using VBA" /><category term="VBA Input Function Example" /><category term="No of occurrences using Find Method Excel VBA" /><category term="BuiltinDocumentProperties" /><category term="Delete Word Backup files using Word VBA" /><category term="Powerpoint VBA" /><category term="Microsoft Internet Controls - VBA Reference" /><category term="VBA  Move File" /><category term="Show Revisions using Word VBA" /><category term="Save Excel Selection as Image using VBA. How to export Excel Range as Image" /><category term="VBA Input # Statement Example" /><category term="Excel VBA -  keywords" /><category term="Embed PDF Document in Excel/Word using VBA" /><category term="How to copy text from Excel Range to Word bookmark" /><category term="No of Worksheets using Excel VBA" /><category term="Excel VBA code" /><category term="Get Temporary Folder" /><category term="VBA shortcut assignment" /><category term="EXcel VBA Userform Draw Rectangle" /><category term="Extract all Linked Objects in Excel Spreadsheet using VBA" /><category term="Word VBA get Height of Figures" /><category term="Word VBA Mark Index" /><category term="VBA Decimal to Octal Conversion" /><category term="Function to Fill Characters VB" /><category term="1004 -- The file could not be accessed" /><category term="Word VBA Insert Fields" /><category term="Expand Ranges using Word VBA" /><category term="VBA Shapes" /><category term="FileSystemObject" /><category term="Route message to speaker in VBA" /><category term="VBA Pivot Table source" /><category term="VBA Function to Restart Windows" /><category term="VBA CommonDialog Filters" /><category term="File Modification Time" /><category term="How to insert value in a range using VSTO" /><category term="Appending Text Files using VBA" /><category term="ADO Connection string for CSV File" /><category term="Disallow user interaction - Excel VBA" /><category term="Replace Function in VBA Example" /><category term="VBA Creation date" /><category term="Excel VBA Dropdowns" /><category term="Programmaticaly search text in Google" /><category term="Word VBA There are too many spelling or grammatical errors dialog" /><category term="GetOpenFilename Method" /><category term="Get Path of Linked Objects using Word VBA" /><category term="insert field in Word 2007" /><category term="VB6 Temporary Folder" /><category term="Array of Objects in VBA" /><category term="VBA Milliseconds" /><category term="Identify Underlined text throughout the document using Word VBA" /><category term="QueryTable object in Excel VBA" /><category term="VBA Computer Name" /><category term="FileSystemObject Copyfolder" /><category term="Speedup Excel Macros" /><category term="SelfCert.EXe" /><category term="ExportFragment in Word VBA" /><category term="Visual Basic Forms Keypreview  property" /><category term="Word VBA Exists Method" /><category term="Remove Images" /><category term="Search Formatted Text using Excel VBA" /><category term="Delete Module using VBA" /><category term="EXcel VBA AddFromString" /><category term="Office 2010" /><category term="Repair Workbook using VBA" /><category term="Delete Entire Row" /><category term="Word VBA FreeDiskSpace property" /><category term="Creating Excel Pie Chart using Excel VBA" /><category term="CommandBars in Powerpoint using VBA" /><category term="Identify Browser Version using Excel VBA" /><category term="Visual Basic ASC functiion" /><category term="Clear Excel Status Bar  using VBA" /><category term="Application.InputBox" /><category term="Identify Range Containing Formula using Excel VBA" /><category term="Modeless Userform in VBA" /><category term="Visual Basic array dimension" /><category term="VBA Create Module" /><category term="SQL Server 2005 Express Connection through VBA" /><category term="Excel VBA Tag Bold Text" /><category term="Excel Format Images" /><category term="DateDiff Function Example" /><category term="Excel 2003 Delete Comments" /><category term="Compare Word Documents" /><category term="Pivot Table from New Pivot Cache using Excel VBA" /><category term="FileSystemObject GetDriveName" /><category term="Identify Raneg of the Image/Shape" /><category term="EXcel VBA Protection of VB Project" /><category term="Check Date Range" /><category term="Get The Devic eName using VBA" /><category term="Download Office 2010" /><category term="Shell Functions" /><category term="Export Word Range as RTF using VBA" /><category term="Word VBA" /><category term="Dynamic Time" /><category term="VBComponents" /><category term="Compare Headers and Footers in Word Document using VBA" /><category term="EndOfDoc Bookm arks Word VBA" /><category term="install an Excel Add-in using VBA" /><category term="Excel VBA Pivot Tables" /><category term="HTML Help" /><category term="get the list of directories or files using VBA Dir  Function" /><category term="Add a new column to Excel Table using VBA" /><category term="Excel Cell Orientation" /><category term="Ignore Weekends" /><category term="Save As dialog box" /><category term="Execute Visual Basic Program from Command Line" /><category term="VBA OnTime Method" /><category term="BottomRightCell" /><category term="Windows API Get Screen Area" /><category term="Application.Interactive in Excel VBA" /><category term="Word VBA Selection.Information" /><category term="Use Visual Basic .NET or C# Functions in VBA" /><category term="VB Function Get Temp Folder" /><category term="Validate and revert changes to an Excel Range using VBA" /><category term="Openworkspace Excel VBA" /><category term="Mark Selected Text as an Index Entry (Word VBA)" /><category term="VBA Now() function" /><category term="VBA Convert Ranges to Text" /><category term="Programming Word TextBoxes using VBA" /><category term="How to Check Internet Connectivity using VBA" /><category term="Microsoft Internet Controls VBA" /><category term="Query Excel Data effectively" /><category term="Excel VBA Show Unique Rows" /><category term="Excel VBA DataBodyRange" /><category term="Autotagging Word VBA" /><category term="Speedup VBA Performance" /><category term="Make the file Read-Only" /><category term="Outlook VBA Store Hidden Data" /><category term="Excel VBA Copy function" /><category term="EoMonth Worksheet Function" /><category term="VBA Delete Images" /><category term="Excel VBA Autofilter" /><category term="Excel VBA Detect Duplicate Values" /><category term="Format Shapes" /><category term="Dir Function in VBA" /><category term="TopLeftCell" /><category term="VBA Detach Module to Workbook" /><category term="Uninstall Word Addins using VBA" /><category term="Excel VBA Autofilter- Only Last Value of the Array" /><category term="ADO SQL Server 2005 Express" /><category term="FileLen" /><category term="Excel Height of Row" /><category term="Check if a workbook is Saved using Excel VBA" /><category term="Extract TextBoxes using VBA" /><category term="Execute Word Macro on File Open" /><category term="Saves a copy of the workbook" /><category term="Use Image Click to Execute Macro" /><category term="RowHeight using Excel VBA" /><category term="Set Auto Recovery Duration using VBA" /><category term="Delete Word Addins using VBA" /><category term="Excel Chart to GIF Conversion using VBA" /><category term="VBA Attach Module to Workbook" /><category term="Visual Basic GetObject" /><category term="Excel VBA Combo Boxes" /><category term="Extract First Row of the Filtered Range using Excel VBA" /><category term="Run a Macro in a Different Workbook" /><category term="Control Excel from Powerpoint using VBA" /><category term="Open Downloaded Web Pages in Word/Excel using VBA" /><category term="Word VBA Convert Symbols to Entities" /><category term="Using Excel as Database" /><category term="How to undo an action using Excel VBA" /><category term="Developer tab on Ribbon (Excel)" /><category term="Excel VBA Tag Color Text" /><category term="Split Function VBA" /><category term="ListObjects in Excel VBA" /><category term="get the list of directories or files using VBA Functions" /><category term="VBA to edit embedded Excel sheet" /><category term="Add Combo Box to the command Bar" /><category term="VSTO Addins" /><category term="VBA scheduling procedure" /><category term="VBA GetOpenFilename Method" /><category term="Rotate Images" /><category term="Case sensitive comparison" /><category term="Excel VBA add Code Modules" /><category term="VBA Decimal to percent" /><category term="Extract References of a VBA Project" /><category term="simulate speech Echo in VBA" /><category term="Word VBA Set / Reset TrackRevisons" /><category term="Excl macro copy matching rows" /><category term="Delete Control From CommandBar" /><category term="How to insert data to Access 2007 database  using VBA" /><category term="Changing File Attributes" /><category term="Identify End of Document using Word VBA" /><category term="Word VBA Show Field Codes" /><category term="How to create event procedures in VBA for ADO connection" /><category term="Use Images as Command Buttons" /><category term="Permanently hide worksheet from user using VBA" /><category term="disable right click" /><category term="Word VBA Comments" /><category term="Dynamically Draw Rectangle in UserForm" /><category term="Visual Basic Get Screen Width" /><category term="Programmatically Identify cells containing Formula" /><category term="Delete Empty Rows in Excel" /><category term="Create Pivot Table using Excel VBA" /><category term="Resizing Text Boxes" /><category term="VBA Save Chart as Images" /><category term="Hide Excel Status Bar" /><category term="asynchronous voice messages using VBA" /><category term="Excel VBA ListColumn" /><category term="Extract File Names using VBA" /><category term="Transposign an Array" /><category term="Excel Database ADO" /><category term="Move Batch Files using VBA" /><category term="FileSystemObject GetDrive" /><category term="RefreshTable VBA" /><category term="Mail Automation" /><category term="Powerpoint VBA Delete End Points" /><category term="Excel Modeless Userform in VBA" /><category term="Excel VBA BuiltIn property" /><category term="VBA Create Database" /><category term="VBA Collections" /><category term="MaxLength  Property" /><category term="WorksheetFunction.EoMonth" /><category term="How to retrieve free space available using VBA" /><category term="Creating Microsoft Access database on the fly using VBA" /><title>VBA Tips &amp; Tricks</title><subtitle type="html">Welcome to VBA Tips &amp; Tricks.

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

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="alternate" type="text/html" href="http://vbadud.blogspot.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&amp;v=2" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>347</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/oKPC" /><feedburner:info uri="blogspot/okpc" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;D0cMRnc6eCp7ImA9WhVVGE0.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-11T23:44:47.910-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="PPT to PDF using VBA" /><title>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="vb" name="code"&gt;ActivePresentation.ExportAsFixedFormat ActivePresentation.Path &amp;amp; "\" &amp;amp; ActivePresentation.Name &amp;amp; ".pdf", ppFixedFormatTypePDF, ppFixedFormatIntentPrint

&lt;/pre&gt;
&lt;div class="vb" name="code"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="vb" name="code"&gt;
&lt;a href="http://vbadud.blogspot.in/2009/07/how-to-create-pdf-from-word-document.html"&gt;How to Create PDF from Word Document using VBA&lt;/a&gt;&lt;/div&gt;
&lt;div class="vb" name="code"&gt;
&lt;a href="http://vbadud.blogspot.in/2012/01/how-to-convert-word-table-to-pdf-using.html"&gt;How to Convert Word Table to PDF using VBA&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/AeyIcBGW0h0" height="1" width="1"/&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="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2958284501540940639?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2958284501540940639?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/AeyIcBGW0h0/how-to-save-powerpoint-presentation-as.html" title="How to Save PowerPoint Presentation as PDF using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/how-to-save-powerpoint-presentation-as.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYCR345eSp7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:56:06.021-07:00</app:edited><title>Excel VBA TimeStamp – Milliseconds using Excel VBA</title><content type="html">&lt;div class="MsoNormal" style="color: red; font-weight: bold;"&gt;
&lt;span lang="EN-IN"&gt;How to Get Time in Milliseconds using Excel VBA&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&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="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;Public Function TimeInMS() As String&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;  TimeInMS = Strings.Format(Now, "dd-MMM-yyyy HH:nn:ss") &amp;amp; "." &amp;amp; Strings.Right(Strings.Format(Timer, "#0.00"), 2)&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;  &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;End Function&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&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="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;Another method is to use API Functions as shown below&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;Private Type SYSTEMTIME&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wYear As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wMonth As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wDayOfWeek As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wDay As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wHour As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wMinute As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wSecond As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;        wMilliseconds As Integer&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;End Type&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;Private Declare Sub GetSystemTime Lib "kernel32" _&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #999900;"&gt;
&lt;span lang="EN-IN"&gt;   (lpSystemTime As SYSTEMTIME)&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;Public Function TimeToMillisecond() As String&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Dim tSystem As SYSTEMTIME&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Dim sRet&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    On Error Resume Next&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    GetSystemTime tSystem&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    sRet = Hour(Now) &amp;amp; ":" &amp;amp; Minute(Now) &amp;amp; ":" &amp;amp; Second(Now) &amp;amp; _&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;      ":" &amp;amp; tSystem.wMilliseconds&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    TimeToMillisecond = sRet&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;End Function&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&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;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/aTmszEYzhMY" height="1" width="1"/&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="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4202829725097403177?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4202829725097403177?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/aTmszEYzhMY/excel-vba-timestamp-milliseconds-using.html" title="Excel VBA TimeStamp – Milliseconds using Excel VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/excel-vba-timestamp-milliseconds-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEYASH46cCp7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:55:49.018-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA code" /><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 Uninstall Addins" /><category scheme="http://www.blogger.com/atom/ns#" term="Uninstall Excel Addins using VBA" /><title>Excel VBA uninstall Excel Addins</title><content type="html">&lt;div class="MsoNormal" style="color: red; font-weight: bold;"&gt;
&lt;span lang="EN-IN"&gt;Programmatically uninstall Excel Addins using VBA&lt;/span&gt;&lt;/div&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;Sub UnInstall_Addins_From_EXcel_AddinsList()&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;Dim oXLAddin As AddIn&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;For Each oXLAddin In Application.AddIns&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;    Debug.Print oXLAddin.FullName&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;    If oXLAddin.Installed = True Then&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;        &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;        oXLAddin.Installed = False&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;    End If&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;Next oXLAddin&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #000099;"&gt;
&lt;span lang="EN-IN"&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/gL82Sd3DMvM" height="1" width="1"/&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="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3287255428801599116?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3287255428801599116?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/gL82Sd3DMvM/excel-vba-uninstall-excel-addins.html" title="Excel VBA uninstall Excel Addins" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/excel-vba-uninstall-excel-addins.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcDRnw5cCp7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:54:37.228-07:00</app:edited><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 PDF Document in Excel/Word using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Embed Existing Word File to Spreadsheet using Excel VBA" /><title>Embed Existing Word File to Spreadsheet using Excel VBA</title><content type="html">&lt;h1 style="color: #ff6600;"&gt;
&lt;span style="font-size: medium;"&gt; &lt;span lang="EN-IN"&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="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Sub Insert_File_To_sheet()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Dim oWS As Worksheet                ' Worksheet Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Dim oOLEWd As OLEObject             ' OLE Word Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Dim oWD As Document                 ' Word Document Object (Use Microsoft Word Reference)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Set oWS = ActiveSheet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;' embed Word Document&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Set oOLEWd = oWS.OLEObjects.Add(Filename:="C:\VBADUD\Chapter 1.doc")&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oOLEWd.Name = "EmbeddedWordDoc"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oOLEWd.Width = 400&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oOLEWd.Height = 400&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oOLEWd.Top = 30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;' Assign the OLE Object to Word Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;Set oWD = oOLEWd.Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oWD.Paragraphs.Add&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oWD.Paragraphs(oWD.Paragraphs.Count).Range.InsertAfter "This is a sample embedded word document"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;oOLEWd.Activate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff; line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="font-family: Verdana; font-size: 8.5pt;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&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="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&gt;    ActiveSheet.OLEObjects.Add Filename:=         "C:\VBADUD\Sample_CH03.pdf", Link:=False, DisplayAsIcon:=         False&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;b&gt;&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&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="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&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="MsoNormal" style="line-height: normal; margin: 1.5pt 0in;"&gt;
&lt;span lang="EN-IN" style="color: black; font-family: Verdana; font-size: 8.5pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/x7oaoPouI50" height="1" width="1"/&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="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4574661418456799641?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4574661418456799641?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/x7oaoPouI50/embed-existing-word-file-to-spreadsheet.html" title="Embed Existing Word File to Spreadsheet using Excel VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>3</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/embed-existing-word-file-to-spreadsheet.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcASH8yeCp7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:54:09.190-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Retrieve Command Line Arguments" /><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" /><title>Retrieve / Get First Row of Excel AutoFilter using VBA</title><content type="html">&lt;div&gt;
&lt;span style="color: red; font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;&lt;/span&gt; &lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;Sub&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt; Get_Filtered_Range()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; oWS &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; oRng &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; oColRng &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;Dim&lt;/span&gt; oInRng &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;On&lt;/span&gt; &lt;span style="color: blue;"&gt;Error&lt;/span&gt; &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;oWS.UsedRange.AutoFilter(Field:=2, Criteria1:=&lt;span style="color: #a31515;"&gt;"Banana"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;oColRng = oWS.Range(&lt;span style="color: #a31515;"&gt;"A2:A5000"&lt;/span&gt;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;MsgBox(&lt;span style="color: #a31515;"&gt;"Filtered Range is "&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;MsgBox(&lt;span style="color: #a31515;"&gt;"First Row Filtered Range is "&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;Finally&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; &lt;span style="color: blue;"&gt;Not&lt;/span&gt; oWS &lt;span style="color: blue;"&gt;Is&lt;/span&gt; &lt;span style="color: blue;"&gt;Nothing&lt;/span&gt; &lt;span style="color: blue;"&gt;Then&lt;/span&gt; oWS = &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;Err_Filter:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;If&lt;/span&gt; Err &amp;lt;&amp;gt; 0 &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;   &lt;/span&gt;&lt;span style="mso-spacerun: yes;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;GoTo&lt;/span&gt; &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;span style="mso-spacerun: yes;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;End&lt;/span&gt; &lt;span style="color: blue;"&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="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;
&lt;span style="color: blue; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt;End&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-no-proof: yes;"&gt; &lt;span style="color: blue;"&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="http://1.bp.blogspot.com/_s2jU7girbyM/SKGKLgxnztI/AAAAAAAAApw/KDQzuMq7MnY/s1600-h/DND_Filter_Original.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5233616172362485458" src="http://1.bp.blogspot.com/_s2jU7girbyM/SKGKLgxnztI/AAAAAAAAApw/KDQzuMq7MnY/s400/DND_Filter_Original.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://1.bp.blogspot.com/_s2jU7girbyM/SKGKLt-3fyI/AAAAAAAAAp4/gxp56CMk834/s1600-h/DND_Filter_GetFirstRow.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5233616175907700514" src="http://1.bp.blogspot.com/_s2jU7girbyM/SKGKLt-3fyI/AAAAAAAAAp4/gxp56CMk834/s400/DND_Filter_GetFirstRow.JPG" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/HF_-5lufYKs" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4149842056043054539?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/HF_-5lufYKs/retrieve-get-first-row-of-excel.html" title="Retrieve / Get First Row of Excel AutoFilter using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_s2jU7girbyM/SKGKLgxnztI/AAAAAAAAApw/KDQzuMq7MnY/s72-c/DND_Filter_Original.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/retrieve-get-first-row-of-excel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEcGRXo8eSp7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:53:44.471-07:00</app:edited><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" /><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" /><title>UnInstall Word Addins using VBA</title><content type="html">&lt;div class="MsoNormal"&gt;
&lt;b&gt;&lt;span lang="EN-IN"&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&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="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;Private Sub UnInstalled_AllWordAddins()&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Dim oAddin As AddIn&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    On Error GoTo Err_Addin&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    For Each oAddin In AddIns&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;        If oAddin.Installed Then&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;            msg = oAddin.Name&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;            oAddin.Installed = False&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;        End If&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Next oAddin&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;Finally:&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    If Not oAddin Is Nothing Then Set oAddin = Nothing&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;Err_Addin:&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;If Err &amp;lt;  &amp;gt; 0 Then&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Err.Clear&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    GoTo Finally&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;End If&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/SPFaVRmOF0I/AAAAAAAABBM/ybunBmGkI7g/s1600-h/dnd_wordaddin_afterprogram.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5256081561665541954" src="http://3.bp.blogspot.com/_s2jU7girbyM/SPFaVRmOF0I/AAAAAAAABBM/ybunBmGkI7g/s400/dnd_wordaddin_afterprogram.JPG" style="cursor: pointer;" /&gt;Installed Word Addin&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/SPFaVmK-vBI/AAAAAAAABBU/CG5paDzSmuU/s1600-h/dnd_wordaddin_uninstalled.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5256081567188433938" src="http://4.bp.blogspot.com/_s2jU7girbyM/SPFaVmK-vBI/AAAAAAAABBU/CG5paDzSmuU/s400/dnd_wordaddin_uninstalled.JPG" style="cursor: pointer;" /&gt;Word Addin List after Macro Execution. Addin is uninstalled (not removed)&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/O2wUX431Fdw" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/6314007292436974370?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/O2wUX431Fdw/uninstall-word-addins-using-vba.html" title="UnInstall Word Addins using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_s2jU7girbyM/SPFaVRmOF0I/AAAAAAAABBM/ybunBmGkI7g/s72-c/dnd_wordaddin_afterprogram.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/uninstall-word-addins-using-vba.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04CRnYyfip7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:52:47.896-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA AddOLEControl" /><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" /><title>Word VBA add command buttons through code</title><content type="html">&lt;div class="MsoNormal" style="color: red; font-weight: bold;"&gt;
&lt;span lang="EN-IN"&gt;Add CommandButton to Word Document using VBA (through AddOLEControl)&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&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="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;Sub Macro_Add_Button()&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Dim oCtl&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Dim oCmd&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    &lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Set oCtl = ActiveDocument.InlineShapes.AddOLEControl(ClassType:="Forms.CommandButton.1")&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    Set oCmd = oCtl.OLEFormat.Object&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;    oCmd.Caption = "Click Me..."&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal" style="color: #3333ff;"&gt;
&lt;span lang="EN-IN"&gt;End Sub&lt;/span&gt;&lt;/div&gt;
&lt;div class="MsoNormal"&gt;
&lt;span lang="EN-IN"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_s2jU7girbyM/SPFcIKcH4OI/AAAAAAAABCE/_m1lZhtpEeQ/s1600-h/dnd_Word_CommandButton_Add.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5256083535429099746" src="http://3.bp.blogspot.com/_s2jU7girbyM/SPFcIKcH4OI/AAAAAAAABCE/_m1lZhtpEeQ/s400/dnd_Word_CommandButton_Add.JPG" style="cursor: pointer;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/Sc-Fi2AVpAQ" height="1" width="1"/&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="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1050159820040162455?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1050159820040162455?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/Sc-Fi2AVpAQ/word-vba-add-command-buttons-through.html" title="Word VBA add command buttons through code" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_s2jU7girbyM/SPFcIKcH4OI/AAAAAAAABCE/_m1lZhtpEeQ/s72-c/dnd_Word_CommandButton_Add.JPG" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/word-vba-add-command-buttons-through.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D08BRnw7fip7ImA9WhVVE0w.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T07:50:57.206-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Bookmarks" /><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="Excel VBA copy text to Word document" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel to Word using VBA" /><title>Update Word Document with Excel Information using VBA</title><content type="html">&lt;div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&gt;Excel Range to Word Template using VBA&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&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="0" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; margin: auto auto auto 4.65pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184; width: 432px;"&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;tbody&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;
&lt;tr style="height: 15pt; mso-yfti-firstrow: yes; mso-yfti-irow: 0;"&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style="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;" valign="bottom" width="119"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;b&gt;&lt;span style="color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="87"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;b&gt;&lt;span style="color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="72"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;b&gt;&lt;span style="color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="155"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;b&gt;&lt;span style="color: white; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="height: 15pt; mso-yfti-irow: 1;"&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style="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;" valign="bottom" width="119"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="87"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="72"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="155"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;u&gt;&lt;span style="color: blue; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;a href="mailto:Christina@vbadud.com"&gt;&lt;span style="color: blue;"&gt;&lt;span style="font-family: Calibri;"&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="height: 15pt; mso-yfti-irow: 2;"&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style="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;" valign="bottom" width="119"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="87"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="72"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="155"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;u&gt;&lt;span style="color: blue; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;a href="mailto:gkutty@vbadud.com"&gt;&lt;span style="color: blue;"&gt;&lt;span style="font-family: Calibri;"&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="height: 15pt; mso-yfti-irow: 3; mso-yfti-lastrow: yes;"&gt;
&lt;&gt;&amp;lt;&amp;gt;&lt;/&gt;&lt;td style="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;" valign="bottom" width="119"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="87"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="72"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;span style="color: black; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;span style="font-family: Calibri;"&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="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;" valign="bottom" width="155"&gt;&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin: 0cm 0cm 0pt;"&gt;
&lt;u&gt;&lt;span style="color: blue; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-IN;"&gt;&lt;a href="mailto:rkoneru@vbadud.com"&gt;&lt;span style="color: blue;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;Set oWD = oWA.Documents.Add("C:\Users\comp\Documents\Doc2.dot") ' 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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;oWD.Bookmarks("Name").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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;oWD.Bookmarks("ContactNo").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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;oWD.Bookmarks("Address").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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;oWD.Bookmarks("Email").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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="mso-spacerun: yes;"&gt;    &lt;/span&gt;'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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;o:p&gt;&lt;span style="font-family: Calibri;"&gt; &lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&gt;' 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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="color: #0070c0;"&gt;&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&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="MsoNormal" style="margin: 0cm 0cm 10pt;"&gt;
&lt;span style="font-family: Calibri;"&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="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;"&gt;&lt;br clear="all" style="mso-special-character: line-break; page-break-before: always;" /&gt;&lt;/span&gt;&lt;a href="http://1.bp.blogspot.com/_s2jU7girbyM/So9XviLZZlI/AAAAAAAABsc/R2rxGMOBO5o/s1600-h/dnd_Excel_Word.JPG"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5372609354616366674" src="http://1.bp.blogspot.com/_s2jU7girbyM/So9XviLZZlI/AAAAAAAABsc/R2rxGMOBO5o/s400/dnd_Excel_Word.JPG" style="height: 291px; width: 400px;" /&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;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/4mBur0IR1Uo" height="1" width="1"/&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="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3591440017259430048?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3591440017259430048?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/4mBur0IR1Uo/update-word-document-with-excel.html" title="Update Word Document with Excel Information using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_s2jU7girbyM/So9XviLZZlI/AAAAAAAABsc/R2rxGMOBO5o/s72-c/dnd_Excel_Word.JPG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/update-word-document-with-excel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAARHo9fSp7ImA9WhVVEE0.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-02T18:15:45.465-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Create ReadOnly Files" /><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" /><category scheme="http://www.blogger.com/atom/ns#" term="FileSystemObject" /><title>How to Make a File ReadOnly using Excel VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&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="http://vbadud.blogspot.in/2007/05/changing-file-attributes.html"&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="http://vbadud.blogspot.in/2010/05/how-to-iterate-through-all.html"&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="vb" name="code"&gt;Function MakeFileReadOnly(ByVal sFile As String)

Dim strSaveFilename As String

Dim oFSO As Object      'Scripting.FileSystemObject
Dim oFile As Object     'Scripting.File


    ' Create Objects
    ' Uses Late Binding
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    Set oFile = oFSO.GetFile(FilePath:=sFile)

    ' Set file to be read-only
    oFile.Attributes = 1
 
    ' 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="http://vbadud.blogspot.in/2007/05/check-workbook-attributes.html"&gt;Check Workbook Attributes&lt;/a&gt;&amp;nbsp;to confirm if the Workbook is ReadOnly&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/Lvk4zKbOMyQ" height="1" width="1"/&gt;</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="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8726063607707754331?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8726063607707754331?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/Lvk4zKbOMyQ/how-to-make-file-readonly-using-excel.html" title="How to Make a File ReadOnly using Excel VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/05/how-to-make-file-readonly-using-excel.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkYBQnw9fyp7ImA9WhVTFUs.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-29T18:15:53.267-08:00</app:edited><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>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="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-waCZ9AT7Q3A/T07bLHwi3NI/AAAAAAAAElU/l24DxesqgNQ/s1600/Create+Hyperlinks+for+Multiple+Cells.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="358" src="http://1.bp.blogspot.com/-waCZ9AT7Q3A/T07bLHwi3NI/AAAAAAAAElU/l24DxesqgNQ/s640/Create+Hyperlinks+for+Multiple+Cells.png" width="640" /&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="vb" name="code"&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 = "Compared_" &amp;amp; sA &amp;amp; "_" &amp;amp; sB &amp;amp; ".xls"
        Sheets(1).Range("C" &amp;amp; i1).Hyperlinks.Add Cells(i1, 3), "CompareReports\" &amp;amp; sA
    End If
Next i1


End Sub
&lt;/pre&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;See also: &lt;a href="http://vbadud.blogspot.in/2007/12/convert-urls-to-hyperlinks-using-vba.html"&gt;Convert URLs to Hyperlinks using VBA&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/om-qTTaNDe4" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5264380783368879223?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/om-qTTaNDe4/how-to-create-hyperlinks-in-multiple.html" title="How to Create Hyperlinks in multiple cells using EXcel VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-waCZ9AT7Q3A/T07bLHwi3NI/AAAAAAAAElU/l24DxesqgNQ/s72-c/Create+Hyperlinks+for+Multiple+Cells.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/02/how-to-create-hyperlinks-in-multiple.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUcHSX8zeSp7ImA9WhVTFUs.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-29T17:57:18.181-08:00</app:edited><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" /><category scheme="http://www.blogger.com/atom/ns#" term="Convert Text to Array in Excel VBA" /><title>How to Split Text in a Cell to Multiple Cells using Excel VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red; font-size: large;"&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="vb" name="code"&gt;Sub ConvertText2Range()

Dim sText As String, arText

sText = Range("c16").Value

arText = Split(sText, ";")

Range("D16:D" &amp;amp; CStr(16 + UBound(arText))).Value = WorksheetFunction.Transpose(arText)
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-X-aUTDSmWYU/T07WvMKDW_I/AAAAAAAAElM/s_nscs--kNM/s1600/Splitting+Text+Across+Multiple+Ranges.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="358" src="http://2.bp.blogspot.com/-X-aUTDSmWYU/T07WvMKDW_I/AAAAAAAAElM/s_nscs--kNM/s640/Splitting+Text+Across+Multiple+Ranges.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/YpYU57S8OrU" height="1" width="1"/&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="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8848277014289304579?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8848277014289304579?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/YpYU57S8OrU/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>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-X-aUTDSmWYU/T07WvMKDW_I/AAAAAAAAElM/s_nscs--kNM/s72-c/Splitting+Text+Across+Multiple+Ranges.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/02/how-to-split-text-in-cell-to-multiple.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMAQXY8fip7ImA9WhRbE0g.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-02-04T03:20:40.876-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Delete Comments using VBA" /><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" /><title>How to convert Excel Text to Comments using VBA</title><content type="html">&lt;span style="color: red; font-size: large;"&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="-http://vbadud.blogspot.in/2008/09/convert-excel-comments-to-text-using.html"&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="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-mJU8XraYrVc/TywX1QA4KJI/AAAAAAAAEko/TF1DWNrEIKo/s1600/Excel+Add+Comments+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="358" src="http://2.bp.blogspot.com/-mJU8XraYrVc/TywX1QA4KJI/AAAAAAAAEko/TF1DWNrEIKo/s640/Excel+Add+Comments+2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Convert_Text_To_Comments()

Dim sText As String     ' Comment String
Dim i1 As Long          ' Counter
Dim sUser As String     ' User Name

sUser = Application.UserName

For i1 = 1 To ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell).Row
    
    sText = ActiveSheet.Cells(i1, 5).Value
       
    'Deletes Existing Comments
    Cells(i1, 3).ClearComments
    
    ' 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="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Tq9O_d1fmhw/TywXzhqzFiI/AAAAAAAAEkg/QWl_P-Q6X_4/s1600/Excel+Add+Comments.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="188" src="http://1.bp.blogspot.com/-Tq9O_d1fmhw/TywXzhqzFiI/AAAAAAAAEkg/QWl_P-Q6X_4/s320/Excel+Add+Comments.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/PqLr5Rb-O7E" height="1" width="1"/&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="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4779964329421771509?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4779964329421771509?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/PqLr5Rb-O7E/how-to-convert-excel-text-to-comments.html" title="How to convert Excel Text to Comments using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-mJU8XraYrVc/TywX1QA4KJI/AAAAAAAAEko/TF1DWNrEIKo/s72-c/Excel+Add+Comments+2.png" height="72" width="72" /><thr:total>4</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/02/how-to-convert-excel-text-to-comments.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0MNQH06eCp7ImA9WhRUGUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T19:11:31.310-08:00</app:edited><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>How to Extract Comment information from Word VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&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="vb" name="code"&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 "Page : " &amp; oCommentRange.Information(wdActiveEndPageNumber) &amp; vbTab _
                     &amp; "Line : " &amp; oCommentRange.Information(wdFirstCharacterLineNumber) &amp; vbTab

    

Next i1

End Sub
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/xW4QAUyaOW4" height="1" width="1"/&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="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8261303115155648000?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8261303115155648000?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/xW4QAUyaOW4/how-to-extract-comment-information-from.html" title="How to Extract Comment information from Word VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-extract-comment-information-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QBQX86fSp7ImA9WhRUGUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T19:09:10.115-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Tag List Items in Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="ListFormat in Word VBA" /><title>How to Identify and Tag Numbered Lists using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&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="vb" name="code"&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 "
&lt;li&gt;"                  oLI.Range.InsertAfter "&lt;/li&gt;
"
            Next oLI
            oList.Range.InsertBefore "&lt;ol&gt;"             oList.Range.InsertAfter "&lt;/ol&gt;"
        End If
    Next oList


 End Sub

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/A5ddD_BRNBA" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3724296348302520279?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/A5ddD_BRNBA/how-to-identify-and-tag-numbered-lists.html" title="How to Identify and Tag Numbered Lists using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-identify-and-tag-numbered-lists.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak4NR3k4eyp7ImA9WhRUGUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T19:03:16.733-08:00</app:edited><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" /><category scheme="http://www.blogger.com/atom/ns#" term="Compare Formatting Changes in Word Document using VBA" /><title>Compare Word Documents with Headers and Footers using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: orange;"&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="vb" name="code"&gt;Sub CompareDoc()

Dim oDoc1 As Document
Dim oDoc2 As Document

Set oDoc1 = Documents.Open("D:\Changed Header.doc")
Set oDoc2 = Documents.Open("D:\Original Header.doc")
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="http://vbadud.blogspot.in/2007/12/comparing-two-word-documents-using-word.html"&gt;Comparing two Word Documents using Word VBA&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://vbadud.blogspot.in/2007/05/compare-files-by-date.html"&gt;Compare Files by Date&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/vDZmroHaeIE" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/3127896672031708160?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/vDZmroHaeIE/compare-word-documents-with-headers-and.html" title="Compare Word Documents with Headers and Footers using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/compare-word-documents-with-headers-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkUGQ3YzfSp7ImA9WhRUGUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T18:50:22.885-08:00</app:edited><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>How to Convert Word Table to PDF using VBA</title><content type="html">&lt;span style="color: orange;"&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="http://vbadud.blogspot.in/2012/01/how-to-export-parts-of-document-using.html"&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="vb" name="code"&gt;Sub Table2PDF()

Dim oTab As Word.Table
Dim oRange As Word.Range

Set oTab = ActiveDocument.Tables(1)

oTab.Range.ExportAsFixedFormat "D:\Documents and Settings\Admin\My Documents\Tab_PDF.pdf", wdExportFormatPDF

End Sub
&lt;/pre&gt;&lt;br /&gt;
See also:&lt;br /&gt;
&lt;a href="http://vbadud.blogspot.in/2009/07/how-to-create-pdf-from-word-document.html"&gt;Convert Word to PDF using&amp;nbsp;VBA&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/I1jfDKCf7rI" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8436924119930987141?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/I1jfDKCf7rI/how-to-convert-word-table-to-pdf-using.html" title="How to Convert Word Table to PDF using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-convert-word-table-to-pdf-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUAMR3w-eyp7ImA9WhRUGUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T18:43:06.253-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Export Range to New Document" /><category scheme="http://www.blogger.com/atom/ns#" term="ExportFragment 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="Clone Document in Word VBA" /><title>How to Export Parts of Document using Word VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&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="vb" name="code"&gt;Sub PartofText()

Dim oWDRange As Word.Range

Set oWDRange = ActiveDocument.Paragraphs(11).Range
oWDRange.ExportFragment "D:\Documents and Settings\Admin\My Documents\Reference_11.docx", wdFormatDocumentDefault

End Sub
&lt;/pre&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;See also&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;a href="http://vbadud.blogspot.in/2009/09/how-to-export-word-range-as-rtf-using.html"&gt;How to export Word Range as RTF using VBA&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/GRpHuSXe0D0" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/7544337168931891504?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/GRpHuSXe0D0/how-to-export-parts-of-document-using.html" title="How to Export Parts of Document using Word VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-export-parts-of-document-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUUDQ30yeSp7ImA9WhRUGUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-30T18:34:32.391-08:00</app:edited><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>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="http://vbadud.blogspot.in/2012/01/how-to-search-and-highlighttag-string.html"&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="vb" name="code"&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="http://vbadud.blogspot.in/2010/07/how-to-retrieve-value-from-content.html"&gt;How to retrieve value from Content Controls using Word VBA&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://vbadud.blogspot.in/2010/07/how-to-add-content-controls-using-vba.html"&gt;How to add Content Controls using VBA&lt;/a&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/_p3hkk_HU4M" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4931628925923960164?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/_p3hkk_HU4M/how-to-format-part-of-content-controls.html" title="How to Format Part of Content Controls in Word VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-format-part-of-content-controls.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcGQn8_fip7ImA9WhRUGEg.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-29T08:03:43.146-08:00</app:edited><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 Text" /><category scheme="http://www.blogger.com/atom/ns#" term="Word VBA Highlight Strings" /><title>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="vb" name="code"&gt;Sub Highlight_Tag_Found_Word()

Dim sFindText As String

sFindText = "Olympics"

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 "&amp;lt; FoundWord &amp;gt;"
        
        Selection.InsertAfter &amp;lt; /FoundWord &amp;gt;
        
        Selection.MoveRight
        
        Selection.Find.Execute

Loop

 

End Sub

&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/Y0Vl7yvLkOw" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/1861152064967008061?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/Y0Vl7yvLkOw/how-to-search-and-highlighttag-string.html" title="How to Search and Highlight/Tag a string in Word VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-search-and-highlighttag-string.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AFR3s5fCp7ImA9WhRUEUs.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2012-01-21T08:01:56.524-08:00</app:edited><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 method in Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Creating Excel TrendLine Chart using Excel VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="ChartWizard in Excel VBA" /><title>How to create a Trendline Chart using Excel VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red;"&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="color: blue;"&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; '* 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; '* Chart Object&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;On Error GoTo Err_Chart&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&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 = ""&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 = "Percentage Done" '.Axes(Type:=XlAxisType.xlValue).AxisTitle.Text = "% Done"&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; 'oCht.Chart.SetElement (msoElementPrimaryCategoryGridLinesMajor)&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&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="color: blue;"&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; '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="color: blue;"&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="color: blue;"&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="color: blue;"&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; '* 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; '* Chart Object&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;On Error GoTo Err_Chart&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&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 = ""&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 = "Percentage Done" '.Axes(Type:=XlAxisType.xlValue).AxisTitle.Text = "% Done"&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; oCht.Chart.Axes(xlValue).MaximumScale = 1&lt;/span&gt;&lt;br /&gt;
&lt;span style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'oCht.Chart.SetElement (msoElementPrimaryCategoryGridLinesMajor)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: blue;"&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; '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="color: blue;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style="color: orange;"&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&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/1DHQR4xjXaI" height="1" width="1"/&gt;</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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/931236361770751924?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/1DHQR4xjXaI/how-to-create-trendline-chart-using.html" title="How to create a Trendline Chart using Excel VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2012/01/how-to-create-trendline-chart-using.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0UMSHoyeSp7ImA9WhRTFUo.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-06T03:34:49.491-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBA Extract Properties" /><category scheme="http://www.blogger.com/atom/ns#" term="Excel VBA Custom Properties Extraction" /><title>How to Extract Properties from Excel/Word without Opening File using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red; font-size: large;"&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="http://support.microsoft.com/kb/224351"&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's property library (refer image below)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tFr7Qkbomic/TnxKFfE5VoI/AAAAAAAAEAA/K0hzGgKD55U/s1600/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="542" src="http://1.bp.blogspot.com/-tFr7Qkbomic/TnxKFfE5VoI/AAAAAAAAEAA/K0hzGgKD55U/s640/VBA+Microsoft+DSO+File+-+Used+to+Read+Properties+of+Excel+Word+without+opening.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;pre class="vb" name="code"&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="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;The function gets the Filename and the Property to be extracted and returns the property value.&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;Here are some important custom properties&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;How to know if a Excel Workbook has Macro without opening it&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="vb" name="code"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/s-xyg07gqAY" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/4170932246706792565?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/s-xyg07gqAY/how-to-extract-properties-from.html" title="How to Extract Properties from Excel/Word without Opening File using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-tFr7Qkbomic/TnxKFfE5VoI/AAAAAAAAEAA/K0hzGgKD55U/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><feedburner:origLink>http://vbadud.blogspot.com/2011/11/how-to-extract-properties-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D04GR30zeip7ImA9WhdWE08.&quot;"><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><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-06T09:18:46.382-07:00</app:edited><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>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="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3Ze10Xd-9BQ/TmZFPDh8OmI/AAAAAAAAD6I/PgMdA6gz8X4/s1600/Excel%2BTable%2Bto%2BListbox.png" imageanchor="1"&gt;&lt;img border="0" height="360" src="http://1.bp.blogspot.com/-3Ze10Xd-9BQ/TmZFPDh8OmI/AAAAAAAAD6I/PgMdA6gz8X4/s640/Excel%2BTable%2Bto%2BListbox.png" width="640" /&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="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Xx_RrFAWMQo/TmZFPHExltI/AAAAAAAAD6Q/5MplIrH5FJA/s1600/Excel%2BTable%2Bto%2BListbox%2B2.png" imageanchor="1"&gt;&lt;img border="0" height="250" src="http://2.bp.blogspot.com/-Xx_RrFAWMQo/TmZFPHExltI/AAAAAAAAD6Q/5MplIrH5FJA/s400/Excel%2BTable%2Bto%2BListbox%2B2.png" width="400" /&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="vb" name="code"&gt;Dim oWS As Worksheet
    Set oWS = ThisWorkbook.Sheets(3)
    Me.ListBox1.List = oWS.ListObjects(1).ListColumns("Title").DataBodyRange.Value
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-m2H_ATs8ZJs/TmZFPY1LSEI/AAAAAAAAD6Y/OpVqVY3EKos/s1600/Excel%2BTable%2Bto%2BListbox%2B3.png" imageanchor="1"&gt;&lt;img border="0" height="252" src="http://1.bp.blogspot.com/-m2H_ATs8ZJs/TmZFPY1LSEI/AAAAAAAAD6Y/OpVqVY3EKos/s400/Excel%2BTable%2Bto%2BListbox%2B3.png" width="332" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/YQc4cowhXpk" height="1" width="1"/&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?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/8223059977205586040?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/YQc4cowhXpk/how-to-link-excel-table-to-listbox.html" title="How to link Excel Table to ListBox using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-3Ze10Xd-9BQ/TmZFPDh8OmI/AAAAAAAAD6I/PgMdA6gz8X4/s72-c/Excel%2BTable%2Bto%2BListbox.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2011/09/how-to-link-excel-table-to-listbox.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQNRno9fCp7ImA9WhZVE0o.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2391751024296306112</id><published>2011-05-25T19:53:00.000-07:00</published><updated>2011-05-25T19:53:17.464-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-05-25T19:53:17.464-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="VBA XCOPY Function" /><category scheme="http://www.blogger.com/atom/ns#" term="Shell Functions" /><category scheme="http://www.blogger.com/atom/ns#" term="Copy Files using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Move Batch Files using VBA" /><title>How to XCOPY files using VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: red; font-size: large;"&gt;How to copy set of files from one folder to another using VBA / How to run DOS Commands in VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
After a long hibernation I am posting in this blog, thanks to Yaswi. &lt;br /&gt;
&lt;br /&gt;
There is nothing like using the command prompt. This gives a good satisfaction for any programmer / administrator as s/he moves around the files, typing the commands etc&lt;br /&gt;
&lt;br /&gt;
Here is a simple code that moves all the files from one folder to another using XCOPY. You can use all the options of XCOPY with VBA&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="c-sharp" name="code"&gt;Sub Copy_Bunch_Of_Files()

Shell "cmd /c xcopy /y c:\temp\*.* C:\Temp\Backup"

End Sub
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/Rupcoxe_4CM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2391751024296306112/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2011/05/how-to-xcopy-files-using-vba.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2391751024296306112?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2391751024296306112?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/Rupcoxe_4CM/how-to-xcopy-files-using-vba.html" title="How to XCOPY files using VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2011/05/how-to-xcopy-files-using-vba.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkQMRHc8eSp7ImA9Wx5XE0k.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-2347557339804974498</id><published>2010-09-12T20:26:00.000-07:00</published><updated>2010-09-12T20:26:25.971-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-09-12T20:26:25.971-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Export RichTextBox content as RTF file using VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Import RTF file to Activedocument" /><title>How to copy RichTextBox contents to Word document</title><content type="html">&lt;span style="color: orange; font-size: large;"&gt;&lt;strong&gt;How to insert Rich Text Box Content to Word document using VBA&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Let us have a form with a RichTextBox and a Command Button as shown below&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_s2jU7girbyM/TI2ZV8NFqwI/AAAAAAAACxw/aTfOwMpgM2k/s1600/Rich+Text+2+Word+VBA.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" ox="true" src="http://4.bp.blogspot.com/_s2jU7girbyM/TI2ZV8NFqwI/AAAAAAAACxw/aTfOwMpgM2k/s320/Rich+Text+2+Word+VBA.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
The following VBA code will copy the Contents of RichTextBox to the First Paragraph of the ActiveDocument&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Private Sub cmdCopyRTFContent_Click()
    
    Dim oRange As Word.Range            ' Word Range
    Dim sPath As String                 ' Temp Path
    
    Set oRange = ActiveDocument.Paragraphs(1).Range
    
    sPath = "c:\shasurdata\Temp.rtf"
    
    Open sPath For Output As 1
        Print #1, RichTextBox1.TextRTF
    Close #1
    
    oRange.ImportFragment sPath
    
End Sub

&lt;/pre&gt;&lt;br /&gt;
The program Exports the contents of RichTextBox to a RTF file and then imports to the Word document&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/wr4ree1XxkY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/2347557339804974498/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/09/how-to-copy-richtextbox-contents-to.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2347557339804974498?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/2347557339804974498?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/wr4ree1XxkY/how-to-copy-richtextbox-contents-to.html" title="How to copy RichTextBox contents to Word document" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_s2jU7girbyM/TI2ZV8NFqwI/AAAAAAAACxw/aTfOwMpgM2k/s72-c/Rich+Text+2+Word+VBA.PNG" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/09/how-to-copy-richtextbox-contents-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQHR3k-eSp7ImA9Wx5RF08.&quot;"><id>tag:blogger.com,1999:blog-28492262.post-5818410170988345019</id><published>2010-08-25T00:12:00.000-07:00</published><updated>2010-08-25T00:12:16.751-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2010-08-25T00:12:16.751-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Get Path of Linked Objects using Word VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Edit Linked Objects in VBA" /><category scheme="http://www.blogger.com/atom/ns#" term="Accessi" /><title>How to edit Linked Objects using Word VBA</title><content type="html">&lt;strong&gt;&lt;span style="color: orange; font-size: large;"&gt;How to open and edit Linked Excel files from Word using VBA&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
One can insert an object in word by either linking or embedding. We have already seen &lt;a href="http://vbadud.blogspot.com/2010/08/how-to-read-excel-sheet-embedded-in.html"&gt;How to Read and Edit Embedded objects using VBA&lt;/a&gt;, The following code will throw light on accessing a linked object from Word (Excel sheet) and editing the same.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="vb" name="code"&gt;Sub Edit_Linked_Excel_Objects()




Dim oXL As Excel.Application ' Excel App Object

Dim oWB As Excel.Workbook ' Workbook Object

Dim sWB As String ' Linked String

Dim oIShape As InlineShape ' Inline Shape Object



On Error GoTo Err_Report



Set oXL = New Excel.Application



For Each oIShape In ActiveDocument.InlineShapes

If InStr(1, oIShape.OLEFormat.ProgID, "Excel") Then



' Check if the Object is Linked

If oIShape.Type = wdInlineShapeLinkedOLEObject Then



' Get the Source Name of Linked Workbook

sWB = oIShape.LinkFormat.SourceFullName



If Len(Dir(sWB)) &amp;lt;&amp;gt; 0 Then

Set oWB = oXL.Workbooks.Open(sWB, , False)

oWB.Sheets(1).Range("A1").Value = "ID"

oWB.Save

oWB.Close False

oIShape.LinkFormat.Update

Else

MsgBox "Linked file not found"

End If

End If

End If







Next oIShape



Finally:



oXL.Quit

If Not oXL Is Nothing Then Set oXL = Nothing

If Not oWB Is Nothing Then Set oWB = Nothing

If Not oIShape Is Nothing Then Set oIShape = Nothing



Exit Sub

Err_Report:

MsgBox Err.Description &amp;amp; " - " &amp;amp; Err.Number

Err.Clear

GoTo Finally



End Sub


&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/oKPC/~4/qtc_24ujPi0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://vbadud.blogspot.com/feeds/5818410170988345019/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://vbadud.blogspot.com/2010/08/how-to-edit-linked-objects-using-word.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5818410170988345019?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/28492262/posts/default/5818410170988345019?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/oKPC/~3/qtc_24ujPi0/how-to-edit-linked-objects-using-word.html" title="How to edit Linked Objects using Word VBA" /><author><name>Shasur M</name><uri>https://plus.google.com/115020400863197343117</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh6.googleusercontent.com/-GxLeQp6F83s/AAAAAAAAAAI/AAAAAAAAAAA/pzc10z7aLms/s512-c/photo.jpg" /></author><thr:total>1</thr:total><feedburner:origLink>http://vbadud.blogspot.com/2010/08/how-to-edit-linked-objects-using-word.html</feedburner:origLink></entry></feed>
