Skip to main content

Posts

Showing posts from October, 2017

Add a user in command line in Windows and Linux

How to add a user via command line in Windows and Linux? Adding a user whether in Linux or Windows requires the user have rights to create. In Windows you must be a member of the administrator or other groups who has the rights to create a user. In Linux you must be a root or either a member of the sudoers depending on what distro you are using. In Windows to create  a local user in a Windows client operating system such as Windows 7 or Windows 10. A one liner command can be issued to create a local user, using the command prompt Window at an elevated mode or administrator mode. At the command prompt type: Net user   " username" "password"  /add Net user  << this should be type like that it’s part of the command syntax while username and password, can be any data and of course /add is needed meaning the command is adding a user to the system. Example: net user spiderbond 007-homeSp!dey /add Command will add a user name called spiderbo...

Set a graph or shape in Word behind text using VBA

How to set a graph or shape in Word so it stays behind the text using VBA? In Word the option is to right click an object select wrap text and click the desired options such as behind text, in front of text and other options. Setting a graph behind the text is quite useful, if you need to display some text that will be displayed together with the graph. To do this via VBA is plain and simple, a one liner code. ThisDocument.Shapes("NameOfTheChart").WrapFormat.Type = wdWrapBehind wdWrapBehind is equal to set "Behind Text". The one liner VBA code, of course it will apply to any shapes, circle, oval, square or other shapes not just a graph. Code works on Word 2016, it may or may not word in previous version of  Word.  Cheers. Till next time! ================================ Free Android Apps: Click on links below to find out more: Catholic Rosary Guide  f...

How to position a graph in word in a specific page?

Positioning a graph in word is necessary to put the graph in a page where the description or other supporting details for the graph will be placed. But, how to place or put a graph in a specific page in a document? By default, the graph will be generated in the first page of the document. To position a graph in any page in the document is to create a bookmark. If you know exactly where to put the graph, manually create a bookmark by clicking  “Insert” in the ribbon and selecting “Bookmark”. After clicking “Bookmark” it will ask for a name and create any name to define the bookmark. Once the bookmark has been named and created, you can call the bookmark via VBA. Here’s the code to call and select a bookmark: ActiveDocument.Bookmarks("graph1").Select graph1 – is the name of the bookmark. After selecting the bookmark via VBA, call the method to generate the chart. Like: 'initialize and set graph type  Set shp = ActiveDocu...