AutoHotkey Community

It is currently May 27th, 2012, 12:29 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: December 7th, 2009, 5:29 pm 
Offline

Joined: November 20th, 2009, 10:58 pm
Posts: 4
Dear Friends,

I have a template, and I have create a unique document for many individuals based off this template.

Here is what I want to be able to do after I open the template, and press the command key -

I want the the computer to prompt me "Enter Name:" in the Message Box (or something similar), and I want to be able to type the name of the person in the message box.

After I do that, I want it to automatically type that name in the desired place in the Microsoft Word document. Mail merge is not an option.

Thanks!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2009, 5:31 pm 
Offline

Joined: November 9th, 2009, 3:09 pm
Posts: 258
i think its very easy just create a gui,edit and ask the user to enter his name then get the contents of the edit box via guicontrol and just write this content into the word doc


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2009, 5:47 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
it is better to use gui, submit or a simple inputbox. Second, if possible: create a bookmark in the Word document so you can open it, send the shortcut to jump to the bookmark in the word document and send or paste the content from the inputbox.

Look at:
- inputbox
- send
If you already have a file with names, simply fileread and parse the file in a loop:
- FileRead
- Loop, parse, variable...

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2009, 5:58 pm 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Something to start with. Press F1
Code:
   
F1::
InputBox,Name,Fill in the name:,Please give me a name:,,,140,,,,,Gonzo
If ErrorLevel
   Return
Send,%Name%
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 7th, 2009, 6:08 pm 
Offline

Joined: November 20th, 2009, 10:58 pm
Posts: 4
Thanks! That works for the first part...a window appears, where I can now type the text.

However, in the word document, the text is pasted where the cursor is.

I want to have control over the location of the text by specifying the coordinates.

Any suggestions for that? Codes would help, as I am very new to this.

Thanks in advance.

aaffe wrote:
Something to start with. Press F1
Code:
   
F1::
InputBox,Name,Fill in the name:,Please give me a name:,,,140,,,,,Gonzo
If ErrorLevel
   Return
Send,%Name%
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 10th, 2009, 4:46 pm 
Offline

Joined: November 20th, 2009, 10:58 pm
Posts: 4
Thanks! That works for the first part...a window appears, where I can now type the text.

However, in the word document, the text is pasted where the cursor is.

I want to have control over the location of the text by specifying the coordinates.

Any suggestions for that? Codes would help, as I am very new to this.

Thanks in advance.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 10th, 2009, 4:55 pm 
Offline

Joined: November 28th, 2009, 4:45 am
Posts: 3089
You don't need Ahk. Put a word like @@@ where you want the name then do a Find/Replace, and Replace @@@ with John Smith


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 9:54 am 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Or just use Click, x-Position, y-Position to click at the area to paste the text.
upendrasingh wrote:
Thanks! That works for the first part...a window appears, where I can now type the text.

However, in the word document, the text is pasted where the cursor is.

I want to have control over the location of the text by specifying the coordinates.

Any suggestions for that? Codes would help, as I am very new to this.

Thanks in advance.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google [Bot], iDrug, Leef_me, Ohnitiel, rjgatito and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group