Search found 1220 matches

by FanaticGuru
14 Sep 2018, 20:57
Forum: Ask For Help
Topic: Seeking Advice on Best Approach for Email Handling with Attachments
Replies: 22
Views: 780

Re: Seeking Advice on Best Approach for Email Handling with Attachments

I'm not finding anything that can be used to markup the text within the body of an email through a COM object via AHK. When I search for 'ahk com object body bold italics' on Google, the results appear to be focused more on dealing with OFT templates than creating the body using a com object. Is it...
by FanaticGuru
14 Sep 2018, 18:28
Forum: Ask For Help
Topic: Copy from excel and paste in Oracle
Replies: 2
Views: 69

Re: Copy from excel and paste in Oracle

Getting the information from Excel is easy. F12:: xlApp := ComObjActive("Excel.Application") for Cell in xlApp.Range("A2:A1000").Cells if Cell.Value2 { ; Do all your clicky, pasting, tabbing stuff in Oracle ; But for now just display the values from Excel MsgBox % Cell.Value2 "`t" Cell.Offset(0,1).V...
by FanaticGuru
13 Sep 2018, 16:05
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 201

Re: Capture SendMail event in Outlook COM

#Persistent olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newMail.Display ; you can pass params when creating the object MailEventsObj := new MailItemEvents("samesfordfd") ; you can also add to the object after it is...
by FanaticGuru
13 Sep 2018, 13:46
Forum: Ask For Help
Topic: Capture SendMail event in Outlook COM
Replies: 11
Views: 201

Re: Capture SendMail event in Outlook COM

#Persistent olMailItem := 0 ol := ComObjCreate("Outlook.Application") newMail := ol.CreateItem(olMailItem) newMail.Subject := "Hello World!" newMail.Display ; Connect to newMail events ComObjConnect(newMail, new MailItemEvents) return class MailItemEvents { ; MailItem.Send Event (Outlook) ; https:/...
by FanaticGuru
12 Sep 2018, 18:45
Forum: Ask For Help
Topic: Looking for Lexikos "ExploreObj"
Replies: 3
Views: 128

Re: Looking for Lexikos "ExploreObj"

Looking for Lexikos "ExploreObj" I do not remember writing such a function, and I do not have any file by that name on my computer. Perhaps Joe Glines can help. Here is something simliar that I use: /* ; inspired by Lexikos ExploreObj() PrintArr Prints the layout of an array (in text form) so that ...
by FanaticGuru
11 Sep 2018, 19:17
Forum: Ask For Help
Topic: Calling search and replace in MS Words
Replies: 13
Views: 204

Re: Calling search and replace in MS Words

F2:: wdApp := ComObjCreate("Word.Application") wdDoc := wdApp.Documents.Open("c:\Test\One.docx") sFind := "My Name" sReplace := "Fanatic Guru" wdDoc.Content.Find.Execute(sFind,0,0,0,0,0,1,1,0,sReplace,2) wdApp.Selection.WholeStory wdApp.Selection.Copy Clip := ClipboardAll wdApp.Quit(0) ; quit witho...
by FanaticGuru
11 Sep 2018, 19:04
Forum: Ask For Help
Topic: Calling search and replace in MS Words
Replies: 13
Views: 204

Re: Calling search and replace in MS Words

F2:: wdApp := ComObjCreate("Word.Application") wdDoc := wdApp.Documents.Open("c:\Test\One.docx") sFind := "My Name" sReplace := "Fanatic Guru" wdDoc.Content.Find.Execute(sFind,0,0,0,0,0,1,1,0,sReplace,2) wdApp.Selection.WholeStory wdApp.Selection.Copy ; ; Do what ever you need to paste to your othe...
by FanaticGuru
11 Sep 2018, 13:04
Forum: Ask For Help
Topic: Calling search and replace in MS Words
Replies: 13
Views: 204

Re: Calling search and replace in MS Words

The last piece of code is almost it. It opens word, but no document opens in the word. I am sure of the name, path and the folder is R/W for sure (full admin right to the script). Are you sure the script is good and does not miss something? Thank you It works perfectly for me. I did do the filename...
by FanaticGuru
11 Sep 2018, 11:24
Forum: Ask For Help
Topic: Calling search and replace in MS Words
Replies: 13
Views: 204

Re: Calling search and replace in MS Words

Anyone can point me to how I can call a search and replace function in MS Word? It simply opens a word document. Then I need to do a search and replace. F2:: wdApp := ComObjCreate("Word.Application") wdApp.Visible := true wdDoc := wdApp.Documents.Open(A_Desktop "\Test\One.docx") sFind := "My Name" ...
by FanaticGuru
10 Sep 2018, 19:04
Forum: Ask For Help
Topic: Newbie grappling with COM
Replies: 8
Views: 220

Re: Newbie grappling with COM

I'm writing a script to automate some repetitive admin stuff at work. The first step is printing an email from Outlook to a PDF This code will export the current open email in Outlook to a PDF file: F11:: olApp := ComObjActive("Outlook.Application") olInspector := olApp.ActiveInspector.WordEditor.A...
by FanaticGuru
04 Sep 2018, 13:05
Forum: Ask For Help
Topic: New expression format doesn't seem to work
Replies: 6
Views: 126

Re: New expression format doesn't seem to work

How about #if WinActive("ahk_class Notepad") ? Regards Yea, There is a big difference between: if and #if and between ifWinExist and #ifWinExist FG Sorry I'm confused doesn't the hatch make it a hot key/string. I don't want a hotkey. When you use the # it is then a script directive that effects all...
by FanaticGuru
04 Sep 2018, 12:04
Forum: Ask For Help
Topic: ahk: Excel Lastrow
Replies: 4
Views: 120

Re: ahk: Excel Lastrow

Since you are looping anyways there is no real need to know ahead of time how many rows there are. You can just start looping through the cells with a check to stop when you hit a blank cell. This makes the code somewhat simpler. xlApp := ComObjActive("Excel.Application") For Cell in xlApp.Sheets(1)...
by FanaticGuru
31 Aug 2018, 17:01
Forum: Ask For Help
Topic: How to retrieve values from a table
Replies: 1
Views: 92

Re: How to retrieve values from a table

ValueName001 ValueAge001 ValueHeight001 ValueAge001 ValueName002 ValueAge002 ValueHeight002 ValueAge002 ValueName003 ValueAge003 ValueHeight003 ValueAge003 ValueName004 ValueAge004 ValueHeight004 ValueAge004 ValueName005 ValueAge005 ValueHeight005 ValueAge005 And I need AHK to do the following: a) ...
by FanaticGuru
31 Aug 2018, 16:43
Forum: Ask For Help
Topic: New expression format doesn't seem to work
Replies: 6
Views: 126

Re: New expression format doesn't seem to work

Scr1pter wrote:How about
#if WinActive("ahk_class Notepad")
?

Regards
Yea,

There is a big difference between:
if and #if

and between
ifWinExist and #ifWinExist

FG
by FanaticGuru
24 Aug 2018, 15:11
Forum: Ask For Help
Topic: Trying to get better at arrays, need help
Replies: 3
Views: 119

Re: Trying to get better at arrays, need help

Ok, Figured it out for anyone who is curious for each, element in Data { if (ThisName = element.Name) { PersonA := element.User } } This seems more well suited to an associative array. #SingleInstance Force ; get info into Data array UserNames= ( John Bob Tom ) UserIDs= ( J B T ) Names := StrSplit(...
by FanaticGuru
22 Aug 2018, 13:03
Forum: Ask For Help
Topic: variable for Outlook
Replies: 2
Views: 75

Re: variable for Outlook

I cant put a carriage return in a variable. Here is my code. omolist = test ;this works promolist = test`n123 ;this does not work FormatTime, CurrentDateTime,, MM-dd-yy body = %promolist% subject:=CurrentDateTime " promos are on 1030view Omneon HARMONIC and PM EXPORTS" email:="person1@xxx.org;perso...
by FanaticGuru
22 Aug 2018, 12:46
Forum: Ask For Help
Topic: Gotta be a cleaner way
Replies: 3
Views: 120

Re: Gotta be a cleaner way

Can someone with more experience than myself show me how this could be cleaned up and made simpler? I don't have the interest to go through all the code but you need to use some various loops, maybe some subroutines or functions. Here is an example: ;~ A1:=pwb.document.GetElementsByTagName("TD")[14...
by FanaticGuru
21 Aug 2018, 19:42
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 201

Re: COM, Outlook, ClipboardAll

Outlook := ComObjActive("Outlook.Application") email := Outlook.CreateItemFromTemplate(A_Desktop "\Untitled.oft") email.To := "someone@email.com" email.Subject := "COM email test with formatting" ; .Display(true) - True to make the window modal. The default value is False. ; The modal window seems ...
by FanaticGuru
21 Aug 2018, 16:02
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 201

Re: COM, Outlook, ClipboardAll

I'm not sure where to begin on writing some HTML.. so I looked into a normal paste. The one thing is, when I use window spy I can't seem to 'see' the body messsage. The only control name I can find is "_WwG1" and setting text has no effect. I can however use ControlFocus to activate the body. The o...
by FanaticGuru
21 Aug 2018, 15:00
Forum: Ask For Help
Topic: COM, Outlook, ClipboardAll
Replies: 8
Views: 201

Re: COM, Outlook, ClipboardAll

The Help for ClipboardAll explains it pretty well. ClipboardAll returns the binary formatted information of the clipboard and is rarely what you want. Clipboard is what you would normally use in situations like this. FG Thanks for the reply. The only thing is, when I use Clipboard it just behaves a...

Go to advanced search